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

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值