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

时间: 2024-08-13 02:19:02

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

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 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表

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 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表示:带

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

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 7 添加系统开机服务

CentOS 7的服务systemctl脚本存放在:/usr/lib/systemd/,有系统(system)和用户(user)之分,需要开机不登陆就能运行的程序,存在系统服务里,即:/usr/lib/systemd/system目录下 每一个服务以.service结尾,一般会分为3部分:[Unit].[Service]和[Install],我写的这个服务用于开机运行tomcat项目: #vim /usr/lib/systemd/system/filebeat.service   [Unit]