CHKCONFIG(8)
chkconfig(8)
NAME
chkconfig - updates and queries runlevel information for system
services
시스템의 런레벨정보를 질의하고 업데이트한다.
SYNOPSIS
chkconfig --list [name]
chkconfig --add name
chkconfig --del name
chkconfig [--level levels] name <on|off|reset>
chkconfig [--level levels] name
DESCRIPTION
chkconfig provides a simple command-line tool for maintaining the
/etc/rc[0-6].d directory hierarchy by relieving system adminis
trators of the task of directly manipulating the numerous sym?
bolic links in those directories.
This implementation of chkconfig was inspired by the chkconfig
command present in the IRIX operating system. Rather than main?
taining configuration information outside of the /etc/rc[0-6].d
hierarchy, however, this version directly manages the symlinks in
/etc/rc[0-6].d. This leaves all of the configuration information
regarding what services init starts in a single location.
chkconfig has five distinct functions: adding new services for
management, removing services from management, listing the cur?
rent startup information for services, changing the startup
information for services, and checking the startup state of a
particular service.
When chkconfig is run without any options, it displays usage
information. If only a service name is given, it checks to see
if the service is configured to be started in the current run?
level. If it is, chkconfig returns true; otherwise it returns
false. The --level option may be used to have chkconfig query an
alternative runlevel rather than the current one.
If one of on, off, or reset is specified after the service name,
chkconfig changes the startup information for the specified ser?
vice. The on and off flags cause the service to be started or
stopped, respectively, in the runlevels being changed. The reset
flag resets the startup information for the service to whatever
is specified in the init script in question.
By default, the on and off options affect only runlevels 3, 4,
and 5, while reset affects all of the runlevels. The --level
option may be used to specify which runlevels are affected.
Note that for every service, each runlevel has either a start
script or a stop script. When switching runlevels, init will not
re-start an already-started service, and will not re-stop a ser?
vice that is not running.
chkconfig는 시스템관리자가 각각의 디렉토리(/etc/rc[0-6].d)에서 수많은 심볼릭링크들을 직관적으로 다룰수 있게 수행되는 단순한 명령어 라인을 제공한다.
IRIX 시스템에서도 chkconfig는 사용되어진다.
/etc/rc[0-6].d 파일의 외적인 설정정보를 다루기보단 이 버전에서는 /etc/rc[0-6].d 에 있는 심볼릭링크를 직접적으로 다룬다.
이는 처음 하나의 런레벨로 시비스 시작시 모든 설정정보를 남긴다.
chkconfig는 5가지의 함수가 있다.
새로운 서비스를 추가하는것, 서비스를 제거하는것, 현재 서비스가 이루어지는 리스트, 서비스 시작정보의 변경, 각각의 런레벨마다 시작되는 서비스를 체크하는것 들이다.
chkconfig가 어떠한 옵션없이 실행될때는 사용법이 출력된다.
만일 하나의 서비스명이 주어졌을경우, 해당 서비스가 현재 런레벨에 시작되어지게 설정되어 있는지 확인하기위해 체크한다.
현재레벨에서 실행되게 설정이 됐으면 true를, 그렇지않으면 false를 리턴한다.
--level 옵션은 현재의 특정한 런레벨보단 chkconfig 가 상대적인 런레벨을 질의하기 위해 사용되어지곤 한다.
만약 어떠한 서비스명 다음에 on,off 또는 reset 으로 지정이 되면 chkconfig 는 지정된 서비스의 시작정보를 바꾼다.
on,off 플래그는 서비스를 시작시키거나 중지시키고, 각각 해당 런레벨에서 바뀌어질 것이다.
reset 플래그는 시작 스크립트가 어떠한 서비스이건 간에 해당 서비스의 시작정보를 리셋시킨다.
기본적으로 on과 off 옵션은 런레벨 3,4,5 에만 영향을 미친다.
반면 reset 옵션은 모든 런레벨에 영향을 미친다.
--level 옵션은 특정하게 영향을 미칠 런레벨을 지정한다.
시작,종료 스크립트를 가지는 모든 서비스에 참고하라.
런레벨이 바뀔때, init는 이미 시작되고 있는 서비스를 재시작하지 않을 것이다.
그리고 운영되지 않는 서비스를 다시 멈추는 일도 없을것이다(당연하게시리...ㅋ)
OPTIONS
--level levels
Specifies the run levels an operation should pertain to.
It is given as a string of numbers from 0 to 7. For exam?
ple, --level 35 specifies runlevels 3 and 5.
특정한 런레벨을 지정하는데 알맞다.
0에서 7까지의 숫자형 문자로 이루어진다.
예를들면, --level 35 는 런레벨 3과 5를 가리킨다.
--add name
This option adds a new service for management by chkcon?
fig. When a new service is added, chkconfig ensures that
the service has either a start or a kill entry in every
runlevel. If any runlevel is missing such an entry, chk?
config creates the appropriate entry as specified by the
default values in the init script.
이 옵션은 새로운 서비스를 추가한다.
새로운 서비스가 추가될때, chkconfig는 모든 런레벨에서 서비스의 시작과 종료를 안전하게 해준다
만약 어떠한 런레벨에서 어떠한 요소(서비스) 정보를 잃어버리게 되면 chkconfig는 init 스크립트에서 기본값으로 지정한 적당한 요소를 생성한다.
--del name
The service is removed from chkconfig management, and any
symbolic links in /etc/rc[0-6].d which pertain to it are
removed.
/etc/rc[0-6].d 에 있는 심볼릭링크와 그에 연계된 서비스들을 제거한다.
--list name
This option lists all of the services which chkconfig
knows about, and whether they are stopped or started in
each runlevel. If name is specified, information in only
display about service name.
이 옵션은 해당 런레벨에서 시작되는지 종료되던지간에 모든 서비스의 리스트를 출력한다.
만약 name 값이 지정되면 해당 서비스 정보만 출력한다.
RUNLEVEL FILES
Each service which should be manageable by chkconfig needs two or
more commented lines added to its init.d script. The first line
tells chkconfig what runlevels the service should be started in
by default, as well as the start and stop priority levels. If the
service should not, by default, be started in any runlevels, a -
should be used in place of the runlevels list. The second line
contains a description for the service, and may be extended
across multiple lines with backslash continuation.
chkconfig 는 두개 또는 그 이상의 명령들을 init.d 스크립트에 추가함으로써 보다 효율적으로 서비스를 관리할 수있다.
첫 라인은 chkconfig 가 런레벨의 서비스들이 기본적으로 시작될 것인지를 알려준다.
마찬가지로 우선순위의 런레벨에서 시작,종료할 것인지를 알려준다.
기본적으로 어떠한 런레벨에서 서비스가 시작되어지지 않으면 하이픈(-)이 런레벨 리스트에 위치한다.
두번째 라인은 서비스의 설명을 담고있다.
설명은 역슬래쉬와 함께 복잡한 라인들까지 확장될 수도 있을것이다.
예를 들면...
For example, random.init has these three lines:
# chkconfig: 2345 20 80
# description: Saves and restores system entropy pool for \
# higher quality random number generation.
This says that the random script should be started in levels 2,
3, 4, and 5, that its start priority should be 20, and that its
stop priority should be 80. You should be able to figure out
what the description says; the \ causes the line to be continued.
The extra space in front of the line is ignored.
이는 random 스크립트가 런레벨 2,3,4,5 에서 시작이 되고 시작우선권은 20, 종료우선권은 80 이란걸 의미한다. 당신은 이 설명이 무엇을 의미하는지 이해할 수 있을것이다.
역슬래쉬(\)는 라인이 계속 이어지기 때문이다(쉘 참조)
라인앞의 여분의 공간은 무시된다.
SEE ALSO
init(8) ntsysv(8) tksysv(8)
AUTHOR
Erik Troan <ewt@redhat.com>

댓글을 달아 주세요