码迷,mamicode.com
首页 > Web开发 > 详细

apache不支持chkconfig的解决方法

时间:2015-02-27 06:39:24      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:

apache 作为linux启动就运行服务程序

cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd

但是在执行:

chkconfig --add httpd
chkconfig httpd on

的时候出现错误:

service httpd does not support chkconfig

解决办法:
打开 vi /etc/rc.d/init.d/httpd
在#!/bin/sh 下面加上

#chkconfig: 2345 10 90
#description: Activates/Deactivates Apache Web Server

 

加上上面这两行就可以,#必须有
其中:2345是设为要启动的运行级别,10是启动优先级,90是杀死进程的优先级,谁优先谁先挂的意思。

apache不支持chkconfig的解决方法

标签:

原文地址:http://www.cnblogs.com/chenqionghe/p/4302494.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!