[deployment-guide/comm-rel: 12/26] Updated the chkconfig section.

dsilas dsilas at fedoraproject.org
Mon Jun 21 11:42:33 UTC 2010


commit c1c4bccad0703ed3ee9adbf46ef2b45219929806
Author: Jaromir Hradilek <jhradile at redhat.com>
Date:   Tue Jun 15 18:43:09 2010 +0200

    Updated the chkconfig section.

 en-US/Controlling_Access_to_Services.xml |   95 ++++++++++++++++++++++++-----
 1 files changed, 78 insertions(+), 17 deletions(-)
---
diff --git a/en-US/Controlling_Access_to_Services.xml b/en-US/Controlling_Access_to_Services.xml
index 9950012..253a546 100644
--- a/en-US/Controlling_Access_to_Services.xml
+++ b/en-US/Controlling_Access_to_Services.xml
@@ -133,7 +133,7 @@ Password:</screen>
   <section id="s1-services-services">
     <title>Configuring Running Services</title>
     <section id="s2-services-serviceconf">
-      <title>Using <application>Service Configuration</application> Utility</title>
+      <title>Using the <application>Service Configuration</application> Utility</title>
       <para>
         The <application>Service Configuration</application> utility is a graphical application developed by Red Hat to configure which services are started at boot time, as well as to start, stop, and restart them from the menu.
       </para>
@@ -328,25 +328,86 @@ Password:</screen>
       </section>
     </section>
     <section id="s2-services-chkconfig">
-      <title>Using <command>chkconfig</command></title>
-      <para>The <command>chkconfig</command> command can also be used to activate and deactivate services. The <command>chkconfig --list</command> command displays a list of system services and whether they are started (<command>on</command>) or stopped (<command>off</command>) in runlevels 0-6. At the end of the list is a section for the services managed by <command>xinetd</command>.</para>
-      <para>If the <command>chkconfig --list</command> command is used to query a service managed by <command>xinetd</command>, it displays whether the <command>xinetd</command> service is enabled (<command>on</command>) or disabled (<command>off</command>). For example, the command <command>chkconfig --list rsync</command> returns the following output:</para>
-      <screen>rsync on</screen>
-      <para>As shown, <command>rsync</command> is enabled as an <command>xinetd</command> service. If <command>xinetd</command> is running, <command>rsync</command> is enabled.</para>
-      <para>If you use <command>chkconfig --list</command> to query a service in <filename>/etc/rc.d</filename>, that service's settings for each runlevel are displayed. For example, the command <command>chkconfig --list httpd</command> returns the following output:</para>
-      <screen>httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off</screen>
+      <title>Using the <command>chkconfig</command> Utility</title>
       <para>
-        <command>chkconfig</command> can also be used to configure a service to be started (or not) in a specific runlevel. For example, to turn <command>nscd</command> off in runlevels 3, 4, and 5, use the following command:</para>
-      <screen>
-  <command>chkconfig --level 345 nscd off</command>
-      </screen>
-      <warning>
-        <title>Warning</title>
-        <para>Services managed by <command>xinetd</command> are immediately affected by <command>chkconfig</command>. For example, if <command>xinetd</command> is running while <command>rsync</command> is disabled, and the command <command>chkconfig rsync on</command> is executed, then <command>rsync</command> is immediately enabled without having to restart <command>xinetd</command> manually. Changes for other services do not take effect immediately after using <command>chkconfig</command>. You must stop or start the individual service with the command <command>service <replaceable>&lt;daemon&gt;</replaceable> stop</command> (where <replaceable>&lt;daemon&gt;</replaceable> is the name of the service you want to stop; for example, <command>httpd</command>). Replace <command>stop</command> with <command>start</command> or <command>restart</command> to start or restart the service.</para>
-      </warning>
+        The <application>chkconfig</application> utility is a command line application to configure which services are to be started in selected runlevels. It also allows you to list all available services along with their current setting. Note that with the exception of listing, you must have superuser privileges to use this command. To obtain them, log in as root by typing:
+      </para>
+      <screen>~]$ <command>su -</command>
+Password: </screen>
+      <section id="s3-services-chkconfig-listing">
+        <title>Listing the Services</title>
+        <para>
+          To display a list of system services (i.e., the services from the <filename class="directory">/etc/rc.d/init.d/</filename> directpry), either type <command>chkconfig --list</command>, or use <command>chkconfig</command> with no additional arguments. You should be presented with an output similar to this:
+        </para>
+        <screen>~]# <command>chkconfig --list</command>
+NetworkManager  0:off   1:off   2:on    3:on    4:on    5:on    6:off
+abrtd           0:off   1:off   2:off   3:on    4:off   5:on    6:off
+acpid           0:off   1:off   2:on    3:on    4:on    5:on    6:off
+anamon          0:off   1:off   2:off   3:off   4:off   5:off   6:off
+atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off
+auditd          0:off   1:off   2:on    3:on    4:on    5:on    6:off
+avahi-daemon    0:off   1:off   2:off   3:on    4:on    5:on    6:off
+<emphasis>... several lines omitted ...</emphasis>
+wpa_supplicant  0:off   1:off   2:off   3:off   4:off   5:off   6:off</screen>
+        <para>
+          As you can see, each line consists of the name of the service followed by its status (<emphasis>on</emphasis> or <emphasis>off</emphasis>) for each of the seven numbered runlevels. For example, in the listing above, <application>NetworkManager</application> is enabled for runlevel 2, 3, 4, and 5, while <application>abrtd</application> runs in runlevel 3 and 5.
+        </para>
+        <para>
+          To display the current settings for selected service only, use <command>chkconfig --list</command> followed by the name of the service:
+        </para>
+        <screen>~]# <command>chkconfig --list sshd</command>
+sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off</screen>
+      <para>
+        You can also use <command>chkconfig --list <replaceable>&lt;service&gt;</replaceable></command> to display the status of a service that is managed by <application>xinetd</application>. In that case, the output will simply contain the information whether the service is enabled or disabled:
+      </para>
+      <screen>~]# <command>chkconfig --list rsync</command>
+rsync           off</screen>
+      </section>
+      <section id="s3-services-chkconfig-enabling">
+        <title>Enabling the Service</title>
+        <para>
+          To enable the service for runlevels 2, 3, 4, and 5 at the same time, type <command>chkconfig <replaceable>&lt;service&gt;</replaceable> on</command>. For instance:
+        </para>
+        <screen>~]# <command>chkconfig httpd on</command></screen>
+        <para>
+          To enable the service for certain runlevels only, add the <option>--level</option> option followed by the string of numbers from 0 to 6 representing each runlevel in which you want the service to run. For example, to enable the <application>abrtd</application> for runlevels 3 and 5, type:
+        </para>
+        <screen>~]# <command>chkconfig abrtd on --level 35</command></screen>
+        <para>
+          The service will be started the next time you enter one of these runlevels. If you need to start the service immediately, use the <command>service <replaceable>&lt;service&gt;</replaceable> start</command> command.
+        </para>
+        <para>
+          To enable the service that is managed by <application>xinetd</application>, use <command>chkconfig <replaceable>&lt;service&gt;</replaceable> on</command> only, as the <option>--level</option> option is not allowed:
+        </para>
+        <screen>~]# <command>chkconfig rsync on</command></screen>
+        <para>
+          If the <application>xinetd</application> daemon is running, the service is immediately enabled without having to restart the daemon manually.
+        </para>
+      </section>
+      <section id="s3-services-chkconfig-disabling">
+        <title>Disabling the Service</title>
+        <para>
+          To disable the service for runlevels 2, 3, 4, and 5 at the same time, type <command>chkconfig <replaceable>&lt;service&gt;</replaceable> off</command>. For instance:
+        </para>
+        <screen>~]# <command>chkconfig httpd off</command></screen>
+        <para>
+          To disable the service for certain runlevels only, add the <option>--level</option> option followed by the string of numbers from 0 to 6 representing each runlevel in which you want the service to run. For example, to disable the <application>abrtd</application> for runlevels 2 and 4, type:
+        </para>
+        <screen>~]# <command>chkconfig abrtd off --level 24</command></screen>
+        <para>
+          The service will be stopped the next time you enter one of these runlevels. If you need to stop the service immediately, use the <command>service <replaceable>&lt;service&gt;</replaceable> stop</command> command.
+        </para>
+        <para>
+          To disable the service that is managed by <application>xinetd</application>, use <command>chkconfig <replaceable>&lt;service&gt;</replaceable> off</command> only, as the <option>--level</option> option is not allowed:
+        </para>
+        <screen>~]# <command>chkconfig rsync off</command></screen>
+        <para>
+          If the <application>xinetd</application> daemon is running, the service is immediately disabled without having to restart the daemon manually.
+        </para>
+      </section>
     </section>
     <section id="s2-services-ntsysv">
-      <title>Using <application>ntsysv</application></title>
+      <title>Using the <application>ntsysv</application> Utility</title>
       <para>The <application>ntsysv</application> utility provides a simple interface for activating or deactivating services. You can use <application>ntsysv</application> to turn an <command>xinetd</command>-managed service on or off. You can also use <application>ntsysv</application> to configure runlevels. By default, only the current runlevel is configured. To configure a different runlevel, specify one or more runlevels with the <option>--level</option> option. For example, the command <command>ntsysv --level 345</command> configures runlevels 3, 4, and 5.</para>
       <para>The <application>ntsysv</application> interface works like the text mode installation program. Use the up and down arrows to navigate up and down the list. The space bar selects/unselects services and is also used to "press" the <guilabel>Ok</guilabel> and <guilabel>Cancel</guilabel> buttons. To move between the list of services and the <guilabel>Ok</guilabel> and <guilabel>Cancel</guilabel> buttons, use the <keycap>Tab</keycap> key. An asterisk (<guilabel>*</guilabel>) signifies that a service is set to on. Pressing the <keycap>F1</keycap> key displays a short description of the selected service.</para>
       <!-- RHEL5:   ddomingo at redhat.com: added PNG image     -->


More information about the docs-commits mailing list