Chinaunix

标题: apache自启动? [打印本页]

作者: sunny~tea    时间: 2004-04-26 17:51
标题: apache自启动?
实在是没找到,手动编译的apache想用chkconfig自启动,即作的和rpm包装的一样,init.d下的脚本应该怎么写呢?我记着看过相关的贴子结果没搜索到!!帮帮忙!!
作者: llzqq    时间: 2004-04-26 18:23
标题: apache自启动?
# cp support/apachectl /etc/init.d/httpd



在这三行之后添加如下内容:

-----------------------------------------------------------------
#!/bin/sh
#
# Startup script for the Apache Web Server
# chkconfig: - 85 15
# description: Apache is a World Wide Web server.
#
# processname: httpd
# pidfile: /usr/local/apache2/log/httpd.pid
# config: /usr/local/apache2/conf/httpd.conf
-----------------------------------------------------------------


把apache服务设置为开机启动:

# chkconfig --add httpd
# chmod 755 /etc/init.d/httpd
# chkconfig httpd on




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2