목차
728x90

1. Apache Engine
${APACHEDIR}/bin 디렉토리가 $PATH에 잡혀있어야 한다.
1.1. apache 기동
$ apachectl -k start
1. 2. 기동 후 프로세스 확인
$ ps -ef | grep httpd
#아래와 같이 프로세스 기동 확인됨
web 210496 1 0 13:10 ? 00:00:00 /sw/web/apache/bin/httpd -k start
web 210497 210496 0 13:10 ? 00:00:00 /sw/web/apache/bin/httpd -k start
web 210498 210496 0 13:10 ? 00:00:00 /sw/web/apache/bin/httpd -k start
web 210500 210496 0 13:10 ? 00:00:00 /sw/web/apache/bin/httpd -k start
1.3. apache 다운
$ apachectl -k stop
2. 서비스 기동
2.1. 서비스 생성
/usr/lib/systemd/system/apache.service 생성
서비스 생성 시 Root 권한이 존재해야 한다.
- ExecStart : Unit이 시작할 때 실행하는 명령어
- ExecStop : Unit이 종료할 때 실행하는 명령어
- RestartSec : 서비스를 다시 시작하기 전에 대기 시간(단위 : 초)
[Unit]
Description=apache
After=network.target syslog.target
[Service]
Type=forking
User=hfm
Group=hfm
ExecStart=/sw/web/apache/bin/apachectl start
ExecStop=/sw/web/apache/bin/apachectl stop
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
2.2. 서비스 등록
- systemctl daemon-reload : 수정 파일 변경, 서비스 파일 등록 시 해당 명령어 실행 필요
- systemctl start apache.service : apache service 기동
- systemctl status apache.service : apache service 상태 확인
- systemctl restart apache.service : apache service 재기동
- systemctl enable apache.service : OS 부팅 시 자동 기동
- systemctl disable apache.service : OS 부팅 시 자동 기동 되지 않도록 설정
- systemctl stop apache.service : apache service 중지
728x90
'WEB > Apache' 카테고리의 다른 글
[Apache] Rewrite 설정 (0) | 2024.09.23 |
---|---|
[Apache] 에러 모음집 (0) | 2024.05.08 |
[Apache] WAS 연동 (0) | 2024.04.22 |
[Apache] Default Config (0) | 2024.02.19 |
[Apache] 설치 (0) | 2023.07.25 |
728x90

1. Apache Engine
${APACHEDIR}/bin 디렉토리가 $PATH에 잡혀있어야 한다.
1.1. apache 기동
$ apachectl -k start
1. 2. 기동 후 프로세스 확인
$ ps -ef | grep httpd
#아래와 같이 프로세스 기동 확인됨
web 210496 1 0 13:10 ? 00:00:00 /sw/web/apache/bin/httpd -k start
web 210497 210496 0 13:10 ? 00:00:00 /sw/web/apache/bin/httpd -k start
web 210498 210496 0 13:10 ? 00:00:00 /sw/web/apache/bin/httpd -k start
web 210500 210496 0 13:10 ? 00:00:00 /sw/web/apache/bin/httpd -k start
1.3. apache 다운
$ apachectl -k stop
2. 서비스 기동
2.1. 서비스 생성
/usr/lib/systemd/system/apache.service 생성
서비스 생성 시 Root 권한이 존재해야 한다.
- ExecStart : Unit이 시작할 때 실행하는 명령어
- ExecStop : Unit이 종료할 때 실행하는 명령어
- RestartSec : 서비스를 다시 시작하기 전에 대기 시간(단위 : 초)
[Unit]
Description=apache
After=network.target syslog.target
[Service]
Type=forking
User=hfm
Group=hfm
ExecStart=/sw/web/apache/bin/apachectl start
ExecStop=/sw/web/apache/bin/apachectl stop
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
2.2. 서비스 등록
- systemctl daemon-reload : 수정 파일 변경, 서비스 파일 등록 시 해당 명령어 실행 필요
- systemctl start apache.service : apache service 기동
- systemctl status apache.service : apache service 상태 확인
- systemctl restart apache.service : apache service 재기동
- systemctl enable apache.service : OS 부팅 시 자동 기동
- systemctl disable apache.service : OS 부팅 시 자동 기동 되지 않도록 설정
- systemctl stop apache.service : apache service 중지
728x90
'WEB > Apache' 카테고리의 다른 글
[Apache] Rewrite 설정 (0) | 2024.09.23 |
---|---|
[Apache] 에러 모음집 (0) | 2024.05.08 |
[Apache] WAS 연동 (0) | 2024.04.22 |
[Apache] Default Config (0) | 2024.02.19 |
[Apache] 설치 (0) | 2023.07.25 |