首页 > 其他 > 详细

系统服务

时间:2017-01-14 00:28:35      阅读:287      评论:0      收藏:0      [点我收藏+]

调整系统服务两种方式:

一、ntsysv   类似图形化界面

这种方式调整完后需要重启系统生效

二、chkconfig


查看系统服务列表

[root@wy ~]# chkconfig --list

abrt-ccpp       0:关闭 1:关闭 2:关闭 3:启用 4:关闭 5:启用 6:关闭

abrtd           0:关闭 1:关闭 2:关闭 3:启用 4:关闭 5:启用 6:关闭

acpid           0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭

atd             0:关闭 1:关闭 2:关闭 3:关闭 4:启用 5:启用 6:关闭


关闭某个服务

[root@wy ~]# chkconfig atd off

[root@wy ~]# chkconfig atd --list

atd             0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭

说明:on与off操作的是2、3、4、5这四个级别


对单个运行级别进行操作

[root@wy ~]# chkconfig --level 3 atd on

[root@wy ~]# chkconfig --list atd

atd             0:关闭 1:关闭 2:关闭 3:启用 4:关闭 5:关闭 6:关闭


对多个运行级别进行操作

[root@wy ~]# chkconfig --level 345 atd on

[root@wy ~]# chkconfig --list atd

atd             0:关闭 1:关闭 2:关闭 3:启用 4:启用 5:启用 6:关闭

说明:

        系统服务文件放在[root@wy ~]# ls -l /etc/init.d/


可以自定义服务

[root@wy init.d]# cp atd 123

[root@wy init.d]# chkconfig --list | grep 123


添加到系统中

[root@wy init.d]# chkconfig --add 123

[root@wy init.d]# chkconfig --list | grep 123

123             0:关闭 1:关闭 2:关闭 3:启用 4:启用 5:启用 6:关闭


删除

[root@wy init.d]# chkconfig --del 123

[root@wy init.d]# chkconfig --list | grep 123


本文出自 “linux” 博客,转载请与作者联系!

系统服务

原文:http://warm51fun.blog.51cto.com/3884274/1891828

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!