service httpd does not support chkconfig

pache 作为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是杀死进程的优先级,谁优先谁先挂的意思。

本文转自http://blog.sina.com.cn/s/blog_5d15305b0101ceft.html

时间: 2024-08-22 15:40:21

service httpd does not support chkconfig的相关文章

Shell脚本安装成服务加入系统启动-service XX does not support chkconfig

背景:Shell脚本是linux运维人员必备利器,怎么样把shell脚本安装成服务且加入系统启动,然后就可以使用服务来管理,这是一个很重要的问题. 当我们运行安装服务的命令时候,假设服务名为myservice #chkconfig --add myservice 常常会出现 service myservice does not support chkconfig 下面讲解正确方法: 1.1给服务脚本添加注释. #vim /etc/init.d/myservice 添加下面两句到 #!/bin/b

service xxx does not support chkconfig

#chkconfig --add myservice 常常会出现 service myservice does not support chkconfig 我们一般在脚本开头加入下面两句就好了 添加下面两句到 #!/bin/bash 之后. # chkconfig: 2345 10 90 # description: myservice .... 其中2345是默认启动级别,级别有0-6共7个级别. 等级0表示:表示关机 等级1表示:单用户模式 等级2表示:无网络连接的多用户命令行模式 等级3表

chkconfig添加服务错误service memcached does not support chkconfig

chkconfig添加服务错误,提示XXX服务不支持 故障原文: [[email protected] ~]# chkconfig --add memcached service memcached does not support chkconfig 故障说明: 无法添加提示该错误是在服务的启动脚本里面没添加chkconfig的级别 解决方案: 我们一般在脚本开头加入下面两句就好了 #gedit /etc/init.d/memecached 添加下面两句到 #!/bin/bash 之后. #

service zookeeper does not support chkconfig解决办法

一 问题描述 部署好ZooKeeper后,需要设置启动脚本并设置开机自动启动. cp /opt/app/zookeeper/bin/zkServer.sh /etc/init.d/zookeeper 更改脚本的参数  ZOOBIN=/opt/app/zookeeper/bin  ZOOBINDIR=/opt/app/zookeeper/bin  ZOO_LOG_DIR=/opt/logs/zookeeper 这个三个参数随意自己定义 执行service zookeeper start 正常,但是

service redis does not support chkconfig

添加redis到自启动服务: [[email protected] redis]# chkconfig --add redis service redis does not support chkconfig 解决方法:(在/etc/init.d/redis添加两行注释) #!/bin/sh #添加的两行注释内容如下: # chkconfig:   2345 90 10 # description:  Redis is a persistent key-value database # 注释的意

service zabbix does not support chkconfig

#chkconfig --add zabbix service zabbix does not support chkconfig 解决方法#vi /etc/init.d/myservice#!/bin/bash 之后添加以下内容: # chkconfig: 2345 10 90 其中2345是默认启动级别,级别有0-6共7个级别. 等级0表示:表示关机 等级1表示:单用户模式 等级2表示:无网络连接的多用户命令行模式 等级3表示:有网络连接的多用户命令行模式 等级4表示:不可用 等级5表示:带

linux下安装tomcat——service tomcat does not support chkconfig

linux下安装tomcat: 1 //解压 2 # tar zxvf apache-tomcat-7.0.92.tar.gz 3 //复制到init.d目录下 4 # cp -p /usr/tomcat/apache-tomcat-7.0.92/bin/catalina.sh /etc/init.d/tomcat 5 # chmod 755 /etc/init.d/tomcat 6 # chkconfig --add tomca 7 //添加tomcat和java目录 8 # vim /etc

CentOS使用chkconfig增加开机服务提示service xxx does not support chkconfig的问题解决

在service服务管理目录下的shell脚本的第二行增加如下内容即可:指定运行级别 chkconfig: 2345 10 90 服务必须在运行级2,3,4,5下被启动或关闭,启动的优先级是90,关闭的优先级是10. description: Start and Stop xxx 原文地址:https://www.cnblogs.com/wangchengshi/p/12683305.html

service php-fpm does not support chkconfig

为了php-fpm管理方便,从php安装目录拷贝了启动脚本,更改相应路径,然后执行添加启动服务,出现如下错误. 经过多方查找,原来是启动脚本中缺少了下面两行内容: # chkconfig:   2345 15 95 # description:  PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation \ # with some additional features useful for si