리눅스 시스템 부팅시 실행할 프로그램을 설정하는 프로그램으론 ntsysv를 많이 사용하지만
chkconfig는그이전부터 사용되던
프로그램이다.
ntsysv가 직관적인 체크방식이지만 오동작이나
혹은 세밀한 런레벨의 설정은 약간 부족한 감이 있다.
이럴때
chkconfig를 사용하면 좋을듯하다.
간단한 사용법은 아래와 같다.
usage: chkconfig --list [name]
chkconfig --add <name>
chkconfig
--del <name>
chkconfig [--level <levels>] <name>
<on|off|reset>)
chkconfig --list명령으로 현재 설정된 *런레벨에 해당되는 실행설정
프로그램의
리스트를 보여준다. 결과는 아래와 비슷할 것이다.
atd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
nscd 0:off 1:off 2:off 3:off
4:off 5:off 6:off
syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
smb 0:off
1:off 2:off 3:on 4:off 5:off 6:off
gpm 0:off 1:off 2:on 3:on 4:on 5:on
6:off
kudzu 0:off 1:off 2:off 3:off 4:off 5:off 6:off
sendmail 0:off 1:off
2:on 3:on 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on
6:off
xfs 0:off 1:off 2:on 3:off 4:off 5:off 6:off
xinetd 0:off 1:off
2:off 3:on 4:on 5:on 6:off
0~6까지가 런레벨에 해당하고 on 과 off로 설정되어있는것을 볼수있다.
여기서는 런레벨 5에서 xfs를 실행하지 않도록 설정하는 예를 보여줄것이다.
#chkconfig --level 5 --del
xfs
위의 명령으로 런레벨5(xwindows로 부팅상태)에서 xfs를 실행하지 않게 된다.
usage에서 보여준 옵션의 조합으로
프로그램의 원하는 런레벨에서의
실행을 설정할수있다.
*런레벨에 관한 설명은 /etc/inittab에 있는글을 참고하기 바란다.
# 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)
아래는 man page의 내용이다.참고하기 바란다.
NAME
chkconfig - configuration state
checker
SYNOPSIS
chkconfig [ -s ]
chkconfig flag
chkconfig [ -f ] flag [ on
| off ]
DESCRIPTION
chkconfig with no arguments or with the -s option prints the
state
(on or off) of every configuration flag found in the directory
/var/config.
The flags normally are shown sorted by name; with the -s option
they are
shown sorted by state.
A flag is considered on if its file contains the string ``on''
and off
otherwise.
If flag is specified as the sole argument, chkconfig exits
with
status 0 if flag is on and with status 1 if flag is off
or
nonexistent. The exit
status can be used by shell scripts to test the
state of a flag.
Here is an example using sh(1) syntax:
if /sbin/chkconfig verbose; then
echo "Verbose is on"
else
echo
"Verbose is off"
fi
The optional third argument allows the specified flag to be set. The
flag
file must exist in order to change its state. Use the -f
(``force'') option
to create the file if necessary.
These flags are used for determining the configuration status of
the
various available subsystems and daemons during system startup and
during
system operation.
A daemon or subsystem is enabled if its configuration flag in
the
/var/config directory is in the on state. If the flag file is
missing,
the flag is considered off. The following is a list of available
flags
and the associated action if the flag is on. Depending upon
your
configuration, they may not all be available on your system.
4DDN Initialize 4DDN (DECnet connectivity) software.
acct Start process accounting.
auto_ipaddress Enable dynamic host configuration protocol (DHCP) as
a
client. See proclaim(1M).
autofs Start the NFS autofs daemon. Only one of the pair autofs
and
automount should normally be enabled.
Page 1
chkconfig(1M) chkconfig(1M)
automount Start the NFS automounter daemon.
desktop If off, fewer of the IRIX Interactive Desktop(TM) user
interface
features are enabled, and typically a different
toolchest menu is used. It is
identical to creating the
file $HOME/.disableDesktop except that it applies
to all
accounts. The specific effect is that the desktop
version of
Xsession (/usr/lib/X11/xdm/Xsession.dt) is not
run upon login, and therefore
programs started from that
file are not run or are run with different
options.
fontserver Start the X11R6 font server daemon. See xfs(1).
gated Start the Cornell routing daemon instead of the BSD
routed.
hypernet Initialize HyperNET controller and routes.
ipfilterd Enable the Silicon Graphics IP Packet Filtering daemon.
jserver Start Japanese convert engine if the optional product
Japanese
Language Module is installed.
lockd Start the NFS lock and status daemons.
mediad Start the removable media daemon.
mrouted Start the IP multicast routing daemon (useful only
on
gateways).
named Start Internet domain name server.
network Allow incoming and outgoing network traffic. This flag
can be set
off if you need to isolate the machine from
the network without removing
cables.
nfs Start the NFS daemons nfsd and biod. Mount all NFS
filesystems.
noiconlogin Do not show user icons on the login screen.
nsr Start up the IRIS NetWorker daemons. See nsr(1M) for
more details.
nostickytmp Do not turn the sticky bit on for the directories /tmp
and
/var/tmp.
pcnfsd Start the PC-NFS server daemon.
privileges Enable privileges to be used on the system. See
runpriv(1M) and
privilege(4) for more details.
Page 2
chkconfig(1M) chkconfig(1M)
quotacheck Run quotacheck(1M) on the filesystems that have quotas
enabled.
See quotas(4) for more details.
quotas Enable quotas for local configured filesystems.
rarpd Start the Reverse ARP daemon.
routed Start the 4.3BSD RIP routing daemon. See routed(1M) for
more
details.
rsvpd Start the RSVP daemon. See rsvpd(1M) for more details.
rtnetd Initialize preemptable networking for real-time use.
rwhod Start the 4.3BSD rwho daemon.
sar Start the system activity reporter.
savecore Enable the saving of kernel crash images. Some
information is
saved in /var/adm/crash even if saving is
disabled. See savecore(1M) and
icrash(1M).
snmpd Start the Simple Network Management Protocol daemon.
soundscheme Start the IRIX Interactive Desktop audio cue daemon.
timed Start the 4.3BSD time synchronization daemon.
timeslave Start the Silicon Graphics time synchronization daemon.
verbose Print the names of daemons as they are started.
videod Enable the video daemon. Used by video devices such as
vino.
vswap Add virtual swap. See swap(1M) for a discussion of
virtual swap. By
default 80000 blocks are added. You
can increase or decrease this amount by
modifying the
/var/config/vswap.options file.
visuallogin Enable the visual login screen.
windowsystem Start the X window system. If windowsystem is off, it
is
necessary to modify the inittab(4) file to enable
getty(1M) on the
textport window if you wish to use
graphics as a dumb terminal.
The recommended means of enabling and disabling the
window system are the
commands startgfx(1G) and
stopgfx(1G).
Page 3
chkconfig(1M) chkconfig(1M)
xdm Start the X display manager.
xlv Start the daemons for xlv logical volumes optional
features.
yp Enable NIS, start the ypbind daemon.
ypmaster If yp is on, become the NIS master and start the passwd
server.
The ypserv flag should be on too.
ypserv If yp is on, become a NIS server.
FILES
/var/config directory containing configuration flag files
관련 링크: http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?chkconfig+1
'System' 카테고리의 다른 글
sxid - s(ug)id 파일검색 프로그램 (0) | 2002.11.05 |
---|---|
grub의 이점 (6) | 2002.09.06 |
저널링(Journalling)과 ReiserFS (0) | 2002.05.14 |
Journaling Filesystem & XFS (1) | 2002.03.24 |
readonly 파티션 rw로 다시 마운트하기? (2) | 2002.02.20 |