glfs/basicnet/netprogs/ntp.xml
Randy McMurchy f5f7f9d980 Added md5sums to Chapter 18 package instructions
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3439 af4574ff-66df-0310-9fd7-8a98e5e911e0
2005-02-11 15:57:40 +00:00

196 lines
6.5 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY ntp-download-http "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-&ntp-version;.tar.gz">
<!ENTITY ntp-download-ftp "ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-&ntp-version;.tar.gz">
<!ENTITY ntp-md5sum "0f8fabe87cf54f409b57c6283f0c0c3d">
<!ENTITY ntp-size "2.4 MB">
<!ENTITY ntp-buildsize "27 MB">
<!ENTITY ntp-time "0.53 SBU">
]>
<sect1 id="ntp" xreflabel="NTP-&ntp-version;">
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<?dbhtml filename="ntp.html"?>
<title>NTP-&ntp-version;</title>
<sect2>
<title>Introduction to <application><acronym>NTP</acronym></application></title>
<para>The <application><acronym>NTP</acronym></application> package contains a
client and server to keep the time synchronized between various computers over
a network. This package is the official reference implementation of the
<acronym>NTP</acronym> protocol.</para>
<sect3><title>Package information</title>
<itemizedlist spacing='compact'>
<listitem><para>Download (HTTP):
<ulink url="&ntp-download-http;"/></para></listitem>
<listitem><para>Download (FTP):
<ulink url="&ntp-download-ftp;"/></para></listitem>
<listitem><para>Download MD5 sum: &ntp-md5sum;</para></listitem>
<listitem><para>Download size: &ntp-size;</para></listitem>
<listitem><para>Estimated disk space required:
&ntp-buildsize;</para></listitem>
<listitem><para>Estimated build time:
&ntp-time;</para></listitem></itemizedlist>
</sect3>
<sect3><title><application><acronym>NTP</acronym></application>
dependencies</title>
<sect4><title>Optional</title>
<para><xref linkend="openssl"/></para>
</sect4>
</sect3>
</sect2>
<sect2>
<title>Installation of <application><acronym>NTP</acronym></application></title>
<para>Install <application><acronym>NTP</acronym></application> by running
the following commands:</para>
<screen><userinput><command>./configure --prefix=/usr --bindir=/usr/sbin \
--sysconfdir=/etc &amp;&amp;
make &amp;&amp;
make install</command></userinput></screen>
</sect2>
<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 &gt; /etc/ntp.conf &lt;&lt; "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>
<para>Execute the following command if you would like to set the
hardware clock at shutdown and reboot based on the current system
time:</para>
<screen><userinput><command>ln -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &amp;&amp;
ln -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock</command></userinput></screen>
<para>The other way around is already set up by
<acronym>LFS</acronym>.</para>
</sect3>
</sect2>
<sect2>
<title>Contents</title>
<para>The <application><acronym>NTP</acronym></application> package
contains <command>ntp-wait</command>, <command>ntptrace</command>,
<command>ntpd</command>, <command>ntpdate</command>,
<command>ntpdc</command>, <command>ntpq</command>,
<command>ntptime</command>, <command>tickadj</command> and
<command>ntp-keygen</command>.</para>
</sect2>
<sect2><title>Description</title>
<sect3><title>ntp-wait</title>
<para><command>ntp-wait</command> is useful at boot time, to delay the
boot sequence until <command>ntpd</command> has set the
time.</para></sect3>
<sect3><title>ntptrace</title>
<para><command>ntptrace</command> traces a chain of
<acronym>NTP</acronym> servers back to the primary source.</para></sect3>
<sect3><title>ntpd</title>
<para><command>ntpd</command> is a NTP daemon that runs in the
background and keeps the date and time synchronized based on response
from configured <acronym>NTP</acronym> servers. It also functions as a
<acronym>NTP</acronym> server.</para></sect3>
<sect3><title>ntpdate</title>
<para><command>ntpdate</command> is a client program that sets the date
and time based on the response from an <acronym>NTP</acronym> server.
This command is deprecated.</para></sect3>
<sect3><title>ntpdc</title>
<para><command>ntpdc</command> is used to query the
<acronym>NTP</acronym> daemon about its current state and to request
changes in that state.</para></sect3>
<sect3><title>ntpq</title>
<para><command>ntpq</command> is an utility program used to monitor
<command>ntpd</command> operations and determine
performance.</para></sect3>
<sect3><title>ntptime</title>
<para><command>ntptime</command> reads and displays time-related
kernel variables.</para></sect3>
<sect3><title>tickadj</title>
<para><command>tickadj</command> reads, and optionally modifies,
several timekeeping-related variables in older kernels that do not have
support for precision timekeeping.</para></sect3>
<sect3><title>ntp-keygen</title>
<para><command>ntp-keygen</command> generates cryptographic data files
used by the <acronym>NTP</acronym>v4 authentication and identification
schemes.</para></sect3>
</sect2>
</sect1>