OS/CentOS

CentOS 서비스 등록 chkconfig runlevel

Lawmin 2013. 6. 27. 10:00

1. yum 으로 서비스 설치

2. /etc/init.d 에서 관련 서비스 스크립트 확인 (아래 서비스명이 됨)

3. chkconfig --level 345 서비스명 on


------------------------------------------------------


* 서비스 runlevel 보기

chkconfig --list [name]


* 서비스 등록

 chkconfig --add <name>


* 서비스 삭제

 chkconfig --del <name>

   

* 서비스 runlevel 조정

          chkconfig [--level <levels>] <name> <on|off|reset>

 

# Default runlevel. The runlevels used by RHS are:

#   0 - halt (Do NOT set initdefault to this)

#   1 - Single user mode

#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)

#   3 - Full multiuser mode

#   4 - unused

#   5 - X11

#   6 - reboot (Do NOT set initdefault to this)

#

id:3:initdefault: