2008. 6. 25. 23:20

service lockdown , chkconfig

linux - service lockdown

stand alone mode로 실행 되는 서비스 데몬은

ntsysv로 관리할 수 있다.

ntsysv는 그래픽 모드로 보여주지만 runlevel에 따라 수정 하기가 불편하기 때문에

 chkconfig 명령어를 사용한다.

[root@fedora ~]# chkconfig
chkconfig version 1.3.30.1 - Copyright (C) 1997-2000 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.

usage:   chkconfig --list [name]
         chkconfig --add <name>
         chkconfig --del <name>
         chkconfig [--level <levels>] <name> <on|off|reset|resetpriorities>

[root@fedora ~]# chkconfig --list
NetworkManager  0:off   1:off   2:off   3:off   4:off   5:off   6:off
NetworkManagerDispatcher        0:off   1:off   2:off   3:off   4:off   5:off  6:off
acpid           0:off   1:off   2:off   3:on    4:on    5:on    6:off
anacron         0:off   1:off   2:on    3:on    4:on    5:on    6:off
apmd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off
auditd          0:off   1:off   2:on    3:on    4:on    5:on    6:off


여러 서비스 명과 각 런레벨 상태에 따른 시작 설정이 되어있는것을 볼 수 있다.

[root@fedora ~]# chkconfig --list sendmail
sendmail        0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@fedora ~]# chkconfig sendmail off               // 전체 해제가 되었다.

[root@fedora ~]# chkconfig --list sendmail
sendmail        0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@fedora ~]# chkconfig --level 5 sendmail on    // 5 level만 켜졌다.
[root@fedora ~]# chkconfig --list sendmail
sendmail        0:off   1:off   2:off   3:off   4:off   5:on    6:off
[root@fedora ~]# chkconfig --level 35 sendmail on   // 3,5레벨만 켜졌다.
[root@fedora ~]# chkconfig --list sendmail
sendmail        0:off   1:off   2:off   3:on    4:off   5:on    6:off
[root@fedora ~]#