Rootop 服务器运维与web架构

apache源码编译启动脚本无法杀掉httpd

| 暂无评论

[root@localhost ~]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using localhost.localdomain. Set the ‘ServerName’ directive globally to suppress this message
httpd (pid 1900) already running
[ OK ]

apache源码编译启动脚本执行restart无法杀掉httpd

找到apache的脚本,查看脚本发现最根本问题是找不到pid文件
通过find搜索pid文件,确定路径后,修改脚本:
[root@localhost ~]# vi /etc/init.d/httpd
httpd=${HTTPD-/usr/sbin/httpd}
#pidfile=${PIDFILE-/var/run/${prog}.pid}
pidfile=/usr/local/apache/logs/httpd.pid
lockfile=${LOCKFILE-/var/lock/subsys/${prog}}

#改为正确pid文件路径即可。

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/2471.html

作者:Venus

服务器运维与性能优化

发表回复