chkconfig命令核心案列及核心原理

chkconfig sshd on  设置sshd开机自启动

chkconfig sshd off  设置sshd开机不启动

chkconfig --level 35 sshd on    设置sshd在运行级别3、5开机自启动

/etc/rc*.d   对应运行级别配置文件目录

 

对/etc/init.d/oldboy

      chkconfig管理脚本的要求

       1、执行/etc/init.d/oldboy restart 格式正常服务

       2、脚本的开头增加如下

       #chkconfig:35 56 24

       #description:oldboy linux test.

       特别注意:

       /etc/init.d/oldboy strat 让程序当前运行

       chkconfig是管理是否开机自启动

       两者没有什么关系

posted on 2016-07-11 13:38  王波波的波  阅读(262)  评论(0编辑  收藏  举报