[deployment-guide] Corrected the "Running Services" section. (BZ#707362)

Jaromir Hradilek jhradile at fedoraproject.org
Mon Jul 11 23:40:52 UTC 2011


commit 764bbf5f779c0cd9b10b3ceab6db4ad6a9eff98a
Author: Jaromir Hradilek <jhradile at redhat.com>
Date:   Tue Jul 12 01:31:14 2011 +0200

    Corrected the "Running Services" section. (BZ#707362)

 en-US/Services_and_Daemons.xml |  154 ++++++++++++++++++++++++---------------
 1 files changed, 95 insertions(+), 59 deletions(-)
---
diff --git a/en-US/Services_and_Daemons.xml b/en-US/Services_and_Daemons.xml
index 83372be..3f92976 100644
--- a/en-US/Services_and_Daemons.xml
+++ b/en-US/Services_and_Daemons.xml
@@ -154,12 +154,15 @@ Password:</screen>
       </para>
       <screen><command>systemctl</command> <option>enable</option> <option><replaceable>service_name</replaceable>.service</option></screen>
       <para>
-        For example, to enable the <systemitem class="service">httpd</systemitem> service, type the following at a shell prompt as <systemitem class="username">root</systemitem>:
-      </para>
-      <screen>~]# <command>systemctl enable httpd.service</command></screen>
-      <para>
-        The service will be started the next time you boot the system. If you need to start the service immediately, use the <command>systemctl</command> command as described in <xref linkend="s3-services-running-running" />.
+        The service will be started the next time you boot the system. For information on how to start the service immediately, refer to <xref linkend="s3-services-running-running" />.
       </para>
+      <example id="exam-services-configuration-enabling">
+        <title>Enabling the httpd service</title>
+        <para>
+          Imagine you want to run the Apache HTTP Server on your system. Provided that you have the <package>httpd</package> package installed, you can enable the <systemitem class="service">httpd</systemitem> service by typing the following at a shell prompt as <systemitem class="username">root</systemitem>:
+        </para>
+        <screen>~]# <command>systemctl enable httpd.service</command></screen>
+      </example>
     </section>
     <section id="s3-services-configuration-disabling">
       <title>Disabling the Service</title>
@@ -168,12 +171,15 @@ Password:</screen>
       </para>
       <screen><command>systemctl</command> <option>disable</option> <option><replaceable>service_name</replaceable>.service</option></screen>
       <para>
-        For example, to disable the <systemitem class="service">httpd</systemitem> service, type the following at a shell prompt as <systemitem class="username">root</systemitem>:
-      </para>
-      <screen>~]# <command>systemctl disable httpd.service</command></screen>
-      <para>
-        The next time you boot the system, the service will <emphasis>not</emphasis> be started. If you need to stop the service immediately, use the <command>systemctl</command> command as described in <xref linkend="s3-services-running-stopping" />.
+        The next time you boot the system, the service will <emphasis>not</emphasis> be started. For information on how to stop the service immediately, refer to <xref linkend="s3-services-running-stopping" />.
       </para>
+      <example id="exam-services-configuration-disabling">
+        <title>Disabling the telnet service</title>
+        <para>
+          In order to secure the system, users are advised to disable insecure connection protocols such as Telnet. You can make sure that the <systemitem class="service">telnet</systemitem> service is disabled by running the following command as <systemitem class="username">root</systemitem>:
+        </para>
+        <screen>~]# <command>systemctl disable telnet.service</command></screen>
+      </example>
     </section>
   </section>
   <section id="s1-services-running">
@@ -202,81 +208,96 @@ Password:</screen>
     <section id="s3-services-running-checking">
       <title>Checking the Service Status</title>
       <para>
-        To determine the status of a service, use the <command>systemctl</command> command in the following form:
+        To determine the status of a particular service, use the <command>systemctl</command> command in the following form:
       </para>
       <screen><command>systemctl</command> <option>status</option> <option><replaceable>service_name</replaceable>.service</option></screen>
       <para>
-        For example, to determine the status of the <systemitem class="service">httpd</systemitem> service, type the following at a shell prompt:
-      </para>
-      <screen>~]$ <command>systemctl status httpd.service</command>
-httpd.service - LSB: start and stop Apache HTTP Server
-          Loaded: loaded (/etc/rc.d/init.d/httpd)
-          Active: active (running) since Mon, 23 May 2011 21:38:57 +0200; 27s ago
-         Process: 2997 ExecStart=/etc/rc.d/init.d/httpd start (code=exited, status=0/SUCCESS)
-        Main PID: 3002 (httpd)
-          CGroup: name=systemd:/system/httpd.service
-                  ├ 3002 /usr/sbin/httpd
-                  ├ 3004 /usr/sbin/httpd
-                  ├ 3005 /usr/sbin/httpd
-                  ├ 3006 /usr/sbin/httpd
-                  ├ 3007 /usr/sbin/httpd
-                  ├ 3008 /usr/sbin/httpd
-                  ├ 3009 /usr/sbin/httpd
-                  ├ 3010 /usr/sbin/httpd
-                  └ 3011 /usr/sbin/httpd</screen>
-      <para>
-        The above command provides a detailed information on the service status. If you only need to verify that a service is running, use the <command>systemctl</command> command in the following form instead:
+        This command provides detailed information on the service's status. However, if you merely need to verify that a service is running, you can use the <command>systemctl</command> command in the following form instead:
       </para>
       <screen><command>systemctl</command> <option>is-active</option> <option><replaceable>service_name</replaceable>.service</option></screen>
       <para>
-        For example:
+        Finally, to display a list of all active system services, type:
       </para>
-      <screen>~]$ <command>systemctl is-active httpd.service</command>
-active</screen>
-      <para>
-        To display a list of all active system services, type:
-      </para>
-      <screen>~]$ <command>systemctl list-units --type=service</command>
-UNIT                      LOAD   ACTIVE SUB     JOB DESCRIPTION
-abrt-ccpp.service         loaded active exited      LSB: Installs coredump handler which saves segfault data
-abrt-oops.service         loaded active running     LSB: Watches system log for oops messages, creates ABRT dump directories for each oops
-abrtd.service             loaded active running     ABRT Automated Bug Reporting Tool
-accounts-daemon.service   loaded active running     Accounts Service
-atd.service               loaded active running     Job spooling tools
-<lineannotation>[output truncated]</lineannotation></screen>
+      <screen><command>systemctl list-units --type=service</command></screen>
       <para>
-        As you can see, each line consists of the following columns:
+        This command provides a tabular output with each line consisting of the following columns:
       </para>
       <itemizedlist>
         <listitem>
           <para>
-            <computeroutput>UNIT</computeroutput> — Provides information whether the <systemitem class="service">systemd</systemitem> unit was properly loaded.
+            <computeroutput>UNIT</computeroutput> — A <systemitem class="service">systemd</systemitem> unit name. In this case, a service name.
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            <computeroutput>LOAD</computeroutput> — Information whether the <systemitem class="service">systemd</systemitem> unit was properly loaded.
           </para>
         </listitem>
         <listitem>
           <para>
-            <computeroutput>ACTIVE</computeroutput> — Provides a high-level unit activation state.
+            <computeroutput>ACTIVE</computeroutput> — A high-level unit activation state.
           </para>
         </listitem>
         <listitem>
           <para>
-            <computeroutput>SUB</computeroutput> — Provides a low-level unit activation state. 
+            <computeroutput>SUB</computeroutput> — A low-level unit activation state. 
           </para>
         </listitem>
         <listitem>
           <para>
-            <computeroutput>JOB</computeroutput> — Displays a pending job for a unit.
+            <computeroutput>JOB</computeroutput> — A pending job for the unit.
           </para>
         </listitem>
         <listitem>
           <para>
-            <computeroutput>DESCRIPTION</computeroutput> — Provides a brief description of the service.
+            <computeroutput>DESCRIPTION</computeroutput> — A brief description of the unit.
           </para>
         </listitem>
       </itemizedlist>
+      <example id="exam-services-running-checking">
+        <title>Checking the status of the httpd service</title>
+        <para>
+          <xref linkend="exam-services-configuration-enabling" /> illustrated how to enable starting the <systemitem class="service">httpd</systemitem> service at boot time. Imagine that the system has been restarted and you need to verify that the service is really running. You can do so by typing the following at a shell prompt:
+        </para>
+        <screen>~]$ <command>systemctl is-active httpd.service</command>
+active</screen>
+        <para>
+          You can also display detailed information about the service by running the following command:
+        </para>
+        <screen>~]$ <command>systemctl status httpd.service</command>
+httpd.service - LSB: start and stop Apache HTTP Server
+          Loaded: loaded (/etc/rc.d/init.d/httpd)
+          Active: active (running) since Mon, 23 May 2011 21:38:57 +0200; 27s ago
+         Process: 2997 ExecStart=/etc/rc.d/init.d/httpd start (code=exited, status=0/SUCCESS)
+        Main PID: 3002 (httpd)
+          CGroup: name=systemd:/system/httpd.service
+                  ├ 3002 /usr/sbin/httpd
+                  ├ 3004 /usr/sbin/httpd
+                  ├ 3005 /usr/sbin/httpd
+                  ├ 3006 /usr/sbin/httpd
+                  ├ 3007 /usr/sbin/httpd
+                  ├ 3008 /usr/sbin/httpd
+                  ├ 3009 /usr/sbin/httpd
+                  ├ 3010 /usr/sbin/httpd
+                  └ 3011 /usr/sbin/httpd</screen>
+      </example>
+      <example id="exam-services-running-checking-all">
+        <title>Listing all active services</title>
+        <para>
+          You can list all active services by using the following command:
+        </para>
+        <screen>~]$ <command>systemctl list-units --type=service</command>
+UNIT                      LOAD   ACTIVE SUB     JOB DESCRIPTION
+abrt-ccpp.service         loaded active exited      LSB: Installs coredump handler which saves segfault data
+abrt-oops.service         loaded active running     LSB: Watches system log for oops messages, creates ABRT dump directories for each oops
+abrtd.service             loaded active running     ABRT Automated Bug Reporting Tool
+accounts-daemon.service   loaded active running     Accounts Service
+atd.service               loaded active running     Job spooling tools
+<lineannotation>[output truncated]</lineannotation></screen>
       <para>
         In the example above, the <systemitem class="service">abrtd</systemitem> service is loaded, active, and running, and it does not have any pending jobs.
       </para>
+      </example>
     </section>
     <section id="s3-services-running-running">
       <title>Running the Service</title>
@@ -285,9 +306,15 @@ atd.service               loaded active running     Job spooling tools
       </para>
       <screen><command>systemctl</command> <option>start</option> <option><replaceable>service_name</replaceable>.service</option></screen>
       <para>
-        For example, to start the <systemitem class="service">httpd</systemitem> service, type the following at a shell prompt as <systemitem class="username">root</systemitem>:
+        This will start the service in the current session. To configure the service to be started at boot time, refer to <xref linkend="s3-services-configuration-enabling" />.
       </para>
-      <screen>~]# <command>systemctl start httpd.service</command></screen>
+      <example id="exam-services-running-running">
+        <title>Running the httpd service</title>
+        <para>
+          <xref linkend="exam-services-configuration-enabling" /> illustrated how to run the <systemitem class="service">httpd</systemitem> service at boot time. You can start the service immediately by typing the following at a shell prompt as <systemitem class="username">root</systemitem>:
+        </para>
+        <screen>~]# <command>systemctl start httpd.service</command></screen>
+      </example>
     </section>
     <section id="s3-services-running-stopping">
       <title>Stopping the Service</title>
@@ -296,9 +323,15 @@ atd.service               loaded active running     Job spooling tools
       </para>
       <screen><command>systemctl</command> <option>stop</option> <option><replaceable>service_name</replaceable>.service</option></screen>
       <para>
-        For example, to stop the <systemitem class="service">httpd</systemitem> service, type the following at a shell prompt as <systemitem class="username">root</systemitem>:
+        This will stop the service in the current session. To disable starting the service at boot time, refer to <xref linkend="s3-services-configuration-enabling" />.
       </para>
-      <screen>~]# <command>systemctl stop httpd.service</command></screen>
+      <example id="exam-services-running-stopping">
+        <title>Stopping the telnet service</title>
+        <para>
+          <xref linkend="exam-services-configuration-disabling" /> illustrated how to disable starting the <systemitem class="service">telnet</systemitem> service at boot time. You can stop the service immediately by running the following command as <systemitem class="username">root</systemitem>:
+        </para>
+        <screen>~]# <command>systemctl stop telnet.service</command></screen>
+      </example>
     </section>
     <section id="s3-services-running-restarting">
       <title>Restarting the Service</title>
@@ -306,10 +339,13 @@ atd.service               loaded active running     Job spooling tools
         To restart a service, use the <command>systemctl</command> command in the following form:
       </para>
       <screen><command>systemctl</command> <option>restart</option> <option><replaceable>service_name</replaceable>.service</option></screen>
-      <para>
-        For example, to restart the <systemitem class="service">httpd</systemitem> service, type the following at a shell prompt as <systemitem class="username">root</systemitem>:
-      </para>
-      <screen>~]# <command>systemctl restart httpd.service</command></screen>
+      <example id="exam-services-running-restarting">
+        <title>Restarting the sshd service</title>
+        <para>
+          For any changes in the <filename>/etc/ssh/sshd_config</filename> configuration file to take effect, it is required that you restart the <systemitem class="service">sshd</systemitem> service. You can do so by typing the following at a shell prompt as <systemitem class="username">root</systemitem>:
+        </para>
+        <screen>~]# <command>systemctl restart httpd.service</command></screen>
+      </example>
     </section>
   </section>
   <section id="s1-services-additional-resources">


More information about the docs-commits mailing list