Web/apache
[Linux] Apache Service 등록
고지식한청춘
2020. 6. 11. 11:37
728x90
아파치 서비스 등록
1. Service 파일 생성
$ vi /usr/lib/systemd/system/apache.service
[Unit]
Description=apache
After=network.target syslog.target
[Service]
Type=forking
User=root
Group=root
ExecStart=/usr/local/apache/bin/apachectl start
ExecStop=/usr/local/apache/bin/apachectl stop
Umask=007
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
2. systemctl daemon 재시작
$ systemctl daemon-reload
◎ 정상적으로 Service가 등록되었는지 확인
$ systemctl status apache
728x90