linux 命令 /sbin/chkconfig

来源:互联网 发布:手机电脑连接软件 编辑:程序博客网 时间:2024/05/01 04:05

 

 

chkconfig --list 查看全部服务状态
例如:
运行chkconfig --list httpd
看自动启动状态
httpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
0~6是指运行级别,一般服务器都运行在3这个级别上。

添加为自动启动
chkconfig --add httpd
或者指定运行级别
chkconfig --level 345 httpd on

 

停止自动启动
chkconfig --del httpd
或指定运行级别
chkconfig --level 345 httpd off

原创粉丝点击