有时候为了方便管理,我们常常喜欢在Linux中将之安装为服务,然后就可以使用服务来管理。

但是当我们运行安装服务的命令时候,假设服务名为 myservice

#chkconfig --add myservice

常常会出现

service myservice does not support chkconfig

我们一般在脚本开头加入下面两句就好了

#gedit /etc/init.d/myservice

添加下面两句到 #!/bin/bash 之后。

# chkconfig: 2345 10 90
# description: myservice ....

其中2345是默认启动级别,级别有0-6共7个级别。

  • 等级0表示:表示关机   
  • 等级1表示:单用户模式   
  • 等级2表示:无网络连接的多用户命令行模式   
  • 等级3表示:有网络连接的多用户命令行模式   
  • 等级4表示:不可用   
  • 等级5表示:带图形界面的多用户模式   
  • 等级6表示:重新启动

10是启动优先级,90是停止优先级,优先级范围是0-100,数字越大,优先级越低。

service XXX does not support chkconfig(service报错)相关推荐

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

    CentOS使用chkconfig增加开机服务提示service xxx does not support chkconfig的问题解决 参考文章: (1)CentOS使用chkconfig增加开机服 ...

  2. “service httpd does not support chkconfig” 問題

    "service httpd does not support chkconfig" 問題 在 Redhat 上面使用編譯的方式安裝 Apache 後,將 bin/apachect ...

  3. service zookeeper does not support chkconfig解决办法

    一 问题描述 部署好ZooKeeper后,需要设置启动脚本并设置开机自动启动. cp /opt/app/zookeeper/bin/zkServer.sh /etc/init.d/zookeeper ...

  4. Failed to resolve: com.android.support:appcompat-v7:27.+ 报错解决方法

    Failed to resolve: com.android.support:appcompat-v7:27.+ 报错解决方法 参考文章: (1)Failed to resolve: com.andr ...

  5. cmd输入pip报错_安装虚拟环境+pip安装XXX包的常见操作与报错解决

    安装虚拟环境+pip安装XXX包的常见操作与报错解决​blog.csdn.net 文章目录: 一.开始前提 二.安装虚拟环境的常见操作 三.pip 的命令的常见操作:安装.更新.卸载.指定源 四.安装 ...

  6. Android Studio support 26.0.0-alpha1 Failed to resolve: com.android.support:appcompat-v7:27.+ 报错解决方法

    Android Studio support 26.0.0-alpha1 Failed to resolve: com.android.support:appcompat-v7:27.+ 报错解决方法 ...

  7. Parsing error: No Babel config file detected for xxx Either disable config file checking...报错解决方法

    Parsing error: No Babel config file detected for xxx Either disable config file checking-报错解决方法 使用Vu ...

  8. 安装虚拟环境+pip安装XXX包的常见操作与报错解决

    文章目录 开始前提 安装虚拟环境的常见操作 pip 的命令的常见操作:安装.更新.卸载.指定源, 安装第三方包常见报错 1. WARNING: The script virtualenv-clone. ...

  9. android 已经依赖了某个库,但是还是会提示Cannot resolve symbol ‘xxx‘,运行却不会报错

    Cannot resolve symbol 'Theme' in styles.xml (Android Studio)Failed to load AppCompat ActionBar with ...

最新文章

  1. PhpStorm升级后调用某些类提示phpstorm Unhandled exceptions
  2. 计算机组成原理二进制地址码,计算机组成原理
  3. stdafx.h头文件
  4. QT:触摸屏支持手指触摸,增加touch事件touchevent,记录前后touch坐标并处理
  5. JavaWeb中如何通过Request对象获取客户端IP地址
  6. 微信小程序循环不同列表实现动态点击隐藏
  7. python 量化交易_Python量化交易,tushare与talib学习示例演示,双均线(DMA)买卖策略...
  8. sd省队集训d1t1
  9. js获取当前时间戳,仿PHP函数模式
  10. sql azure 语法_在Azure中使用SQL Server 2016 CTP3
  11. 软件唯有开源才是出路?
  12. 【重点】剑指offer——面试题25:二叉树中和为某一值的路径
  13. 数据库备份工具mysqldump重要参数详解
  14. IOS开发-jqeurey mobile
  15. 服务器网页源代码被修改6,特洛伊木马服务器源代码(C#)
  16. Untracked Files Prevent Checkout (AndroidStudio切换分支报错)
  17. 7z linux压缩命令行,压缩解压.7z格式文件示例——Linux命令行方式
  18. DevExpress之C#界面+MATLAB动态链接库联合编程
  19. 李白打酒*C语言简易版(递归)
  20. 给Docker NodeRed 设置登陆账户

热门文章

  1. 分子进化和系统发育的基础知识
  2. AnimalTFDB 3.0 | 动物转录因子注释和预测的综合资源库
  3. 本地使用Rfam 12.0+
  4. 13产品经理要懂的-人性的恶要怎么利用
  5. java+逆向工程怎么运行_MyBatis逆向工程的创建和使用
  6. python浪漫文艺_Python程序员的文艺之路
  7. python可以这样学读书笔记_Python小白的读书笔记
  8. 系统架构师学习笔记-操作系统(二)
  9. C++设计模式-使用Qt框架模拟策略模式(Strategy)商场促销
  10. Struts2 - Action 基础用法