centos7添加httpd为系统服务

2016-09-29

vim /usr/lib/systemd/system/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

类别:数据库 | 阅读:2949 | 评论:1 | 标签:centos linux httpd

想收藏或者和大家分享这篇好文章→

“centos7添加httpd为系统服务”共有0条留言

发表评论

姓名:

邮箱:

网址:

验证码:

公告

2014年10月4日创建

标签云

最近评论

友情链接