[들어가기 앞서]
자료정리를 이웃을 위해하는 것이 아니라, 보기 좋게 만드는 것이 아니라
다시 이글을 읽을때 빠른 이해와 적용을 목적에 둘 것.

Red Hat Enterprise Linux에는 서비스(데몬)를 켜고 끌 수 있는 3가지 프로그램:서비스 설정 도구 (system-config-services), ntsysv, chkconfig이 포함되어 있습니다.

[예비지식]
1] 명령어의 사용자 권한 알아볼 것!
2] runlevel 에 대해서 알아야 됨.
0 - 시스템 종료(halt) 되는 상태
1 - Root User만 시스템을 사용할 수 있는 Single user mode
2 - 네트웍이 안되는 Multiuser
3 - Full multiuser mode
4 - 사용자 정의를 위해 비어있음
5 - X 윈도우가 실행되는 상태
6 - 시스템을 껏다켬 (Reboot)


[ntsysv]
ntsysv 실행시켜보면 텍스트모드의 메뉴를 발견하게 될 것이다.
부팅시 같이 실행시키는 daemon은 *로 표시되어 있고,
그 데몬에 대해 잘모르면 F1키를 눌러보면 잘 설명되어 있다.

[chkconfig]
커맨드라인에서 작동하는 명령어 인데
chkconfig --list란 옵션을 주어 확인할 수 있다.
/etc/rc.d/init.d 에 스크립트가 존재해야 적용할 수 있다.

[system-config-services]
ssh로 접속해서 실행해보면,

Unable to initialize graphical environment. Most likely cause of failure
is that the tool was not run using a graphical environment. Please either
start your graphical user interface or set your DISPLAY variable.
Caught exception: could not open display

[참고]
xhost로 혹시 될까 해보았는데 안된다. ^^; 나중에 한번 더 확인해보자구...


언제나 man 명령어가 효율적임을


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
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 administrators
of the task of directly manipulating the numerous symbolic links in those directories.
This implementation of chkconfig was inspired by the chkconfig command present in the IRIX operating system. Rather than maintaining
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 current
startup information for services, changing the startup information for services, and checking the startup state of a particular ser-
vice.
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 runlevel. 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 service.
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 2, 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 service that is not running.
chkconfig also can manage xinetd scripts via the means of xinetd.d configuration files. Note that only the on, off, and --list commands
are supported for xinetd.d services.
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 example, --level 35
specifies runlevels 3 and 5.
--add name
This option adds a new service for management by chkconfig. 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, chkconfig creates the appropriate
entry as specified by the default values in the init script. Note that default entries in LSB-delimited INIT INFO sections
take precedence over the default runlevels in the initscript.
--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.
Note that future package installs for this service may run chkconfig --add, which will re-add such links. To disable a service,
run chkconfig name off.
--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.
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.
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.
SEE ALSO
init(8) ntsysv(8) system-config-services(8)
AUTHOR
Erik Troan
4th Berkeley Distribution Wed Oct 8 1997 CHKCONFIG(8)



NTSYSV(8) NTSYSV(8)
NAME
ntsysv - simple interface for configuring runlevels
SYNOPSIS
ntsysv [--back] [--level ]
DESCRIPTION
ntsysv is a simple interface for configuring runlevel services which are also configurable through chkconfig. By default, it configures
the current runlevel. If the user would like to configure other runlevels, those levels can be specified on the command line by listing
the levels after --levels, without any spaces. For example, the option --levels 016 edits runlevels 0, 1, and 6.
A service is considered to be started in the runlevel set if it is started in any of the runlevels which are being edited.
The ntsysv window normally contains a Cancel button. If --back is specified, a Back button appears instead.
RETURN CODES
ntsysv returns 0 on success, 2 on error, and 1 if the user cancelled (or backed out of) the program.
SEE ALSO
chkconfig(8), serviceconf(8)
AUTHOR
Erik Troan
4th Berkeley Distribution Mon Oct 13 1997 NTSYSV(8)



serviceconf(8) serviceconf(8)
NAME
system-config-services - Service Configuration Utility
SYNTAX
system-config-services
DESCRIPTION
This is a graphical tool for enabling and disabling services (including xinetd services). Functionality to start, stop, and restart
services is also included.
OPTIONS
None
FILES
/usr/bin/system-config-services
/usr/share/serviceconf/*
EXAMPLES
To run this program simply type:
system-config-services
LIMITATIONS
This utility currently execs chkconfig --add/--del when enabling and disabling services. This means that it does not have
the same default behaviour as ntsysv.
SEE ALSO
chkconfig(8) ntsysv(8)
BUGS
- Some services will not start or stop properly if started anywhere but the console (system-config-services will appear to hang in
these instances). This is not a bug in system-config-services, but in the individual services.
- Some services are incredibly hard to detect if they are running or not. Starting, stopping and restarting initscripts may give mixed
results (ie. may fail if you are stopping a service thats already stopped, etc). This will be fixed; until then its a bug.
AUTHORS
Tim Powers
Bill Nottingham
Dan Walsh
Wed May 16 2001 serviceconf(8)

'컴퓨터(InfoTech)' 카테고리의 다른 글

Adobe Reader for Symbian OS  (0) 2005/12/31
[freeBSD] New to FreeBSD  (1) 2005/12/26
[linux] ntsysv, chkconfig, system-config-services  (0) 2005/12/25
[trace02]  (0) 2005/12/25
[trace01]  (0) 2005/12/23
[Fedora Core 4] Installing to Tomcat 5.5.12 - #2  (0) 2005/12/21
Posted by iarchitect