service httpd supports chkconfig,but is not referencged in any runlevel( run 'chkconfig --add httpd')
测试空间旗下大头针出品
问题描述:
在使用tar包安装apache httpd后,配置其能开机自启动
原因是:在httpd的配置文件中加入下面两行
# chkconfig: 2345 110 111
# description: www start and stop httpd service
解释:2345意思是在2345的模式下开机自动启动服务
110代表开启服务的编号,111代表关闭服务的编号
1.chkconfig --add httpd
2.chkconfig --list httpd
当执行第二步的时候。出现标题中列出service httpd supports chkconfig,but is not referencged in any runlevel( run 'chkconfig --add httpd')问题。
问题解决:
原因是chkconfig支持两位的编号,后来我修改成
# chkconfig: 2345 10 12
# description: www start and stop httpd service
使用下列命令:
chkconfig --list httpd
会显示 2345 on 016 off
如果你想修改httpd的自启动级别,可以使用
chkconfig --level 24 httpd off
等等