mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 23:32:12 +08:00
339fbfb99a
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4863 af4574ff-66df-0310-9fd7-8a98e5e911e0
292 lines
9.4 KiB
XML
292 lines
9.4 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.4/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;">
|
|
<?dbhtml filename="ntp.html"?>
|
|
|
|
<sect1info>
|
|
<othername>$LastChangedBy$</othername>
|
|
<date>$Date$</date>
|
|
</sect1info>
|
|
|
|
<title>NTP-&ntp-version;</title>
|
|
|
|
<indexterm zone="ntp">
|
|
<primary sortas="a-NTP">NTP</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to NTP</title>
|
|
|
|
<para>The <application>NTP</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
|
|
NTP protocol.</para>
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
<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>
|
|
|
|
<bridgehead renderas="sect3">NTP Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para><xref linkend="openssl"/></para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of NTP</title>
|
|
|
|
<para>Install <application>NTP</application> by running
|
|
the following commands:</para>
|
|
|
|
<screen><userinput>./configure --prefix=/usr --bindir=/usr/sbin \
|
|
--sysconfdir=/etc &&
|
|
make</userinput></screen>
|
|
|
|
<para>To test the results, issue: <command>make check</command>.</para>
|
|
|
|
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
|
|
|
<screen role="root"><userinput>make install &&
|
|
install -v -m755 -d /usr/share/doc/ntp-&ntp-version; &&
|
|
cp -v -R html /usr/share/doc/ntp-&ntp-version;/</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="configuration">
|
|
<title>Configuring NTP</title>
|
|
|
|
<sect3 id="ntp-config">
|
|
<title>Config Files</title>
|
|
|
|
<para><filename>/etc/ntp.conf</filename></para>
|
|
|
|
<indexterm zone="ntp ntp-config">
|
|
<primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
|
|
</indexterm>
|
|
|
|
</sect3>
|
|
|
|
<sect3>
|
|
<title>Configuration Information</title>
|
|
|
|
<para>The following configuration file defines various NTP
|
|
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 NTP website at <ulink url="http://www.ntp.org/"/> for more information.</para>
|
|
|
|
<screen role="root"><userinput>cat > /etc/ntp.conf << "EOF"
|
|
<literal># 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</literal>
|
|
EOF</userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
<sect3 id="ntp-init">
|
|
<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>
|
|
|
|
<indexterm zone="ntp ntp-init">
|
|
<primary sortas="f-ntp">ntp</primary>
|
|
</indexterm>
|
|
|
|
<screen role="root"><userinput>make install-ntp</userinput></screen>
|
|
|
|
<para>If you prefer to run <command>ntpd</command> periodically, add the
|
|
following command to <systemitem class="username">root</systemitem>'s
|
|
<filename>crontab</filename>:</para>
|
|
|
|
<screen><literal>ntpd -q</literal></screen>
|
|
|
|
<para>Execute the following command if you would like to set the
|
|
hardware clock to the current system time at shutdown and reboot:</para>
|
|
|
|
<screen role="root"><userinput>ln -v -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &&
|
|
ln -v -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock</userinput></screen>
|
|
|
|
<para>The other way around is already set up by LFS.</para>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Libraries</segtitle>
|
|
<segtitle>Installed Directory</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>ntp-keygen, ntp-wait, ntpd, ntpdate, ntpdc, ntpq,
|
|
ntptime, ntptrace, and tickadj</seg>
|
|
<seg>None</seg>
|
|
<seg>/usr/share/doc/ntp-&ntp-version;</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<varlistentry id="ntp-keygen">
|
|
<term><command>ntp-keygen</command></term>
|
|
<listitem>
|
|
<para>generates cryptographic data files used by the NTPv4 authentication
|
|
and identification schemes.</para>
|
|
<indexterm zone="ntp ntp-keygen">
|
|
<primary sortas="b-ntp-keygen">ntp-keygen</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="ntp-wait">
|
|
<term><command>ntp-wait</command></term>
|
|
<listitem>
|
|
<para>is useful at boot time, to delay the boot sequence until
|
|
<command>ntpd</command> has set the time.</para>
|
|
<indexterm zone="ntp ntp-wait">
|
|
<primary sortas="b-ntp-wait">ntp-wait</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="ntpd">
|
|
<term><command>ntpd</command></term>
|
|
<listitem>
|
|
<para>is a NTP daemon that runs in the background and keeps
|
|
the date and time synchronized based on response from configured
|
|
NTP servers. It also functions as a NTP server.</para>
|
|
<indexterm zone="ntp ntpd">
|
|
<primary sortas="b-ntpd">ntpd</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="ntpdate">
|
|
<term><command>ntpdate</command></term>
|
|
<listitem>
|
|
<para>is a client program that sets the date and time based on
|
|
the response from an NTP server. This command is deprecated.</para>
|
|
<indexterm zone="ntp ntpdate">
|
|
<primary sortas="b-ntpdate">ntpdate</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="ntpdc">
|
|
<term><command>ntpdc</command></term>
|
|
<listitem>
|
|
<para>is used to query the NTP daemon about its current state
|
|
and to request changes in that state.</para>
|
|
<indexterm zone="ntp ntpdc">
|
|
<primary sortas="b-ntpdc">ntpdc</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="ntpq">
|
|
<term><command>ntpq</command></term>
|
|
<listitem>
|
|
<para>is an utility program used to monitor <command>ntpd</command>
|
|
operations and determine performance.</para>
|
|
<indexterm zone="ntp ntpq">
|
|
<primary sortas="b-ntpq">ntpq</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="ntptime">
|
|
<term><command>ntptime</command></term>
|
|
<listitem>
|
|
<para>reads and displays time-related kernel variables.</para>
|
|
<indexterm zone="ntp ntptime">
|
|
<primary sortas="b-ntptime">ntptime</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="ntptrace">
|
|
<term><command>ntptrace</command></term>
|
|
<listitem>
|
|
<para>traces a chain of NTP servers back to the primary source.</para>
|
|
<indexterm zone="ntp ntptrace">
|
|
<primary sortas="b-ntptrace">ntptrace</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="tickadj">
|
|
<term><command>tickadj</command></term>
|
|
<listitem>
|
|
<para>reads, and optionally modifies, several timekeeping-related
|
|
variables in older kernels that do not have support for precision
|
|
timekeeping.</para>
|
|
<indexterm zone="ntp tickadj">
|
|
<primary sortas="b-tickadj">tickadj</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|