centos 7 (레드햇7)
$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[root@localhost system]# vi httpd.service
[root@localhost system]# pwd
/usr/lib/systemd/system
[root@localhost system]# pwd
/usr/lib/systemd/system
[root@localhost system]#
$ service httpd start : 아파치 스타트
httpd 는 httpd.service 파일명이 /usr/lib/systemd/system/ 디렉토리에 있다.
httpd.service 구동하는 명령어는
$ service httpd start
$ vi httpd.service
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=man:httpd(8)
Documentation=man:apachectl(8)
[Service]
Type=notify
EnvironmentFile=/etc/sysconfig/httpd
ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
ExecStop=/bin/kill -WINCH ${MAINPID}
# We want systemd to give httpd some time to finish gracefully, but still want
# it to kill httpd after TimeoutStopSec if something went wrong during the
# graceful stop. Normally, Systemd sends SIGTERM signal right after the
# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give
# httpd time to finish.
KillSignal=SIGCONT
PrivateTmp=true
[Install]
WantedBy=multi-user.target
'인프라' 카테고리의 다른 글
[apache] mod_rewrite 이용하여 www 자동으로 붙여주자 (0) | 2024.11.14 |
---|---|
루트 인증서 개인 인증서 개념정리 (0) | 2024.10.25 |
[보안취약점] 웹서비스 메소드 설정 및 조치 방안 (GET POST PUT PATCH...) (0) | 2023.07.25 |
[가마] 센서 데이터를 java 로 받을때 문제점 빅엔디안/리틀엔디안 (0) | 2023.07.14 |
우분투 ll alias 추가 (0) | 2023.07.07 |