Chkconfig - Red Hat LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE Manual

Hide thumbs Also See for LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE:
Table of Contents

Advertisement

98
Changes do not take effect immediately after using ntsysv. You must
stop or start the individual service with the command service dae-
mon stop. In the previous example, replace daemon with the name of
the service you want to stop; for example, httpd. Replace stop with
start or restart to start or restart the service. If you want to start
or stop a service which is managed by xinetd, use the command ser-
vice xinetd restart.

8.5 chkconfig

The chkconfig command can also be used to activate and deactivate services. If you use the chk-
config --list command, you will see a list of system services and whether they are started (on)
or stopped (off) in runlevels 0-6 (at the end of the list, you will see a section for the services managed
by xinetd, which we'll discuss later in this section).
If you use chkconfig --list to query a service managed by xinetd, you will see whether the
xinetd service is enabled (on) or disabled (off). For example, the following command shows that
finger is enabled as an xinetd service:
$ chkconfig --list finger
finger
As shown above, if xinetd is running, finger is enabled.
If you use chkconfig --list to query a service in /etc/rc.d, you will see the service's set-
tings for each runlevel, like the following:
$ chkconfig --list anacron
anacron
4:on
More importantly, chkconfig can be used to set a service to be started (or not) in a specific runlevel.
For example, if we wanted to turn nscd off in runlevels 3, 4, and 5, we'd use a command like this:
chkconfig --level 345 nscd off
See the chkconfig man page for more information on how to use it.
on
0:off
1:off
5:on
6:off
Chapter 8:Controlling Access to Services
WARNING
2:on
3:on

Advertisement

Table of Contents
loading

This manual is also suitable for:

Linux 7.2

Table of Contents