mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-10 04:54:44 +08:00
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2250 af4574ff-66df-0310-9fd7-8a98e5e911e0
58 lines
1.8 KiB
XML
58 lines
1.8 KiB
XML
<sect2>
|
|
<title>Configuring <application><acronym>NTP</acronym></application></title>
|
|
|
|
<sect3><title>Config files</title>
|
|
<para><filename>/etc/ntp.conf</filename></para>
|
|
</sect3>
|
|
|
|
<sect3><title>Configuration Information</title>
|
|
|
|
<para>The following configuration file defines various <acronym>NTP</acronym>
|
|
stratum 2 servers with open access from different continents. It also
|
|
creates a drift file where <command>ntpd</command> stores the frequency
|
|
offset. Since the documentation included with the package is sparse,
|
|
visit the <acronym>NTP</acronym> website at
|
|
<ulink url="http://www.ntp.org/"/> for more information.</para>
|
|
|
|
<screen><userinput><command>cat > /etc/ntp.conf << "EOF"</command>
|
|
# Africa
|
|
server tock.nml.csir.co.za
|
|
|
|
# Asia
|
|
server ntp.shim.org
|
|
|
|
# Australia
|
|
server ntp.saard.net
|
|
|
|
# Europe
|
|
server ntp.tuxfamily.net
|
|
|
|
# North America
|
|
server clock.psu.edu
|
|
|
|
driftfile /var/cache/ntp.drift
|
|
<command>EOF</command></userinput></screen>
|
|
</sect3>
|
|
|
|
<sect3><title>Synchronizing the time</title>
|
|
|
|
<para>There are two options. Option one is to run <command>ntpd</command>
|
|
continuously and allow it to synchronize the time in a gradual manner. The other
|
|
option is to run <command>ntpd</command> periodically (using cron)
|
|
and update the time each time <command>ntpd</command> is scheduled.</para>
|
|
|
|
<para>If you choose Option one, then install the
|
|
<filename>/etc/rc.d/init.d/ntp</filename>
|
|
init script included in the
|
|
<xref linkend="intro-important-bootscripts"/> package.</para>
|
|
|
|
<screen><userinput><command>make install-ntp</command></userinput></screen>
|
|
|
|
<para>If you prefer to run ntpd periodically, add the following command to
|
|
root's <filename>crontab</filename>:</para>
|
|
<screen><userinput>ntpd -q</userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|