linux開機啓動服務設置

方法一:兩條命令ssh

spacer.gifwKiom1gQTfPSLeqBAADimTaFy60839.png-wh_50

[root@try ~]# chkconfig --list|grep "3:on"ide

auditd          0:off   1:off   2:on    3:on    4:on    5:on    6:offpost

crond           0:off   1:off   2:on    3:on    4:on    5:on    6:offurl

ip6tables       0:off   1:off   2:on    3:on    4:on    5:on    6:offspa

iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:offrest

kdump           0:off   1:off   2:off   3:on    4:on    5:on    6:offblog

mdmonitor       0:off   1:off   2:on    3:on    4:on    5:on    6:off圖片

netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:offip

network         0:off   1:off   2:on    3:on    4:on    5:on    6:offget

postfix         0:off   1:off   2:on    3:on    4:on    5:on    6:off

rsyslog         0:off   1:off   2:on    3:on    4:on    5:on    6:off

sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off

sysstat         0:off   1:on    2:on    3:on    4:on    5:on    6:off

udev-post       0:off   1:on    2:on    3:on    4:on    5:on    6:off

[root@try ~]# for oldboy in `chkconfig --list|grep "3:on"|awk '{print $1}'`;do chkconfig $oldboy off;done

[root@try ~]# chkconfig --list|grep "3:on"

[root@try ~]# for oldboy in crond network sshd rsyslog;do chkconfig $oldboy on;done

[root@try ~]# chkconfig --list|grep "3:on"

crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off

network         0:off   1:off   2:on    3:on    4:on    5:on    6:off

rsyslog         0:off   1:off   2:on    3:on    4:on    5:on    6:off

sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off

方法二:一條命令

                            spacer.gif

[root@try ~]# chkconfig --list|grep"3:on"|awk '{print $1}'|grep -vE"crond|network|rsyslog|sshd"

auditd

ip6tables

iptables

kdump

mdmonitor

netconsole

netfs

nfs-rdma

postfix

rdisc

rdma

restorecond

saslauthd

sysstat

udev-post

[root@try ~]# for oldboy in `chkconfig--list|grep "3:on"|awk '{print $1}'|grep -vE"crond|network|rsyslog|sshd"`;do chkconfig $oldboy off;done

[root@try ~]# chkconfig --list|grep"3:on"

crond           0:off   1:off  2:on    3:on    4:on   5:on    6:off

network         0:off  1:off   2:on    3:on   4:on    5:on    6:off

rsyslog         0:off  1:off   2:on    3:on   4:on    5:on    6:off

sshd            0:off   1:off  2:on    3:on    4:on   5:on    6:off

 

方法三:

spacer.gif

相關文章
相關標籤/搜索