apache-2.0.52自动启动的问题

本人http2.x很正常,但是没有配置成开机自动运行.
于是我就cp /home/apache2/bin/apachectl /etc/rc.d/init.d/httpd
然后chkconfig httpd on,
系统提示:httpd服务不支持chkconfig?
问题出在哪里了呢?我每次只好手动启动了

 caojiqun 回复于:2004-10-03 19:25:06
不知道你是什么系统,我的做法是在/etc/rc2.d加一个S99Apache,里面写上
/home/apache2/bin/apachectl start &

 mrsanny 回复于:2004-10-10 16:53:13
我的系统是redhat9.0

 level 回复于:2004-10-11 08:36:07
用这个命令try:chkconfig --add httpd

 wudicc 回复于:2004-10-25 16:18:38
从/usr/local/apache/bin/apachectl  到  /etc/rc.d/init.d/httpd 建立一个符号连接:
# ln -s /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd
(上面的这一步也可以用cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd)

然后在此文件(/usr/local/apache/bin/apachectl)总添加以下几行(大概在文件顶部,约第二行的地方):
# chkconfig: 2345 10 90 (10 和 90是代表的意思我还不太清楚,请高手指教)
# description: Activates/Deactivates Apache Web Server
(上面的#不能省去)
最后,运行chkconfig把Apache添加到系统的启动服务组里面:

# /sbin/chkconfig --del httpd
# /sbin/chkconfig --add httpd
# /sbin/chkconfig httpd on
# /sbin/chkconfig httpd off
------------------------------------------------------------------------
Mysql自动启动设置
# /sbin/chkconfig --add mysql
# /sbin/chkconfig mysql on
# /sbin/chkconfig mysql off

你可能感兴趣的:(apache,mysql,redhat)