系统服务

调整系统服务两种方式:ide

1、ntsysv   相似图形化界面spa

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

2、chkconfigclass


查看系统服务列表grep

[root@wy ~]# chkconfig --listdi

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

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

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

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


关闭某个服务

[root@wy ~]# chkconfig atd off

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

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

说明:on与off操做的是二、三、四、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

相关文章
相关标签/搜索