[d47e7ea9] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY ntp-download-http "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-&ntp-version;.tar.gz">
|
---|
| 8 | <!ENTITY ntp-download-ftp "ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-&ntp-version;.tar.gz">
|
---|
| 9 | <!ENTITY ntp-size "2.4 MB">
|
---|
| 10 | <!ENTITY ntp-buildsize "27 MB">
|
---|
| 11 | <!ENTITY ntp-time "0.53 SBU">
|
---|
| 12 | ]>
|
---|
| 13 |
|
---|
[619dd53] | 14 | <sect1 id="ntp" xreflabel="NTP-&ntp-version;">
|
---|
[a0f03b0] | 15 | <sect1info>
|
---|
[5cd0959d] | 16 | <othername>$LastChangedBy$</othername>
|
---|
| 17 | <date>$Date$</date>
|
---|
[a0f03b0] | 18 | </sect1info>
|
---|
[00bb024c] | 19 | <?dbhtml filename="ntp.html"?>
|
---|
[39f01ca] | 20 | <title>NTP-&ntp-version;</title>
|
---|
| 21 |
|
---|
[d47e7ea9] | 22 | <sect2>
|
---|
| 23 | <title>Introduction to <application><acronym>NTP</acronym></application></title>
|
---|
| 24 |
|
---|
| 25 | <para>The <application><acronym>NTP</acronym></application> package contains a client and server
|
---|
| 26 | to keep the time synchronized between various computers over a network.
|
---|
| 27 | This package is the official reference implementation of the <acronym>NTP</acronym> protocol.</para>
|
---|
| 28 |
|
---|
| 29 | <sect3><title>Package information</title>
|
---|
| 30 | <itemizedlist spacing='compact'>
|
---|
| 31 | <listitem><para>Download (HTTP): <ulink url="&ntp-download-http;"/></para></listitem>
|
---|
| 32 | <listitem><para>Download (FTP): <ulink url="&ntp-download-ftp;"/></para></listitem>
|
---|
| 33 | <listitem><para>Download size: &ntp-size;</para></listitem>
|
---|
[518538f] | 34 | <listitem><para>Estimated disk space required: &ntp-buildsize;</para></listitem>
|
---|
[d47e7ea9] | 35 | <listitem><para>Estimated build time: &ntp-time;</para></listitem></itemizedlist>
|
---|
| 36 | </sect3>
|
---|
| 37 |
|
---|
| 38 | <sect3><title><application><acronym>NTP</acronym></application> dependencies</title>
|
---|
| 39 | <sect4><title>Optional</title>
|
---|
[939cf0da] | 40 | <para><xref linkend="openssl-package"/></para></sect4>
|
---|
[d47e7ea9] | 41 | </sect3>
|
---|
| 42 |
|
---|
| 43 | </sect2>
|
---|
| 44 |
|
---|
| 45 | <sect2>
|
---|
| 46 | <title>Installation of <application><acronym>NTP</acronym></application></title>
|
---|
| 47 |
|
---|
| 48 | <para>Install <application><acronym>NTP</acronym></application> by running the following
|
---|
| 49 | commands:</para>
|
---|
| 50 |
|
---|
| 51 | <screen><userinput><command>./configure --prefix=/usr --bindir=/usr/sbin \
|
---|
| 52 | --sysconfdir=/etc &&
|
---|
| 53 | make &&
|
---|
| 54 | make install</command></userinput></screen>
|
---|
| 55 |
|
---|
| 56 | </sect2>
|
---|
| 57 |
|
---|
| 58 | <sect2>
|
---|
| 59 | <title>Configuring <application><acronym>NTP</acronym></application></title>
|
---|
| 60 |
|
---|
| 61 | <sect3><title>Config files</title>
|
---|
| 62 | <para><filename>/etc/ntp.conf</filename></para>
|
---|
| 63 | </sect3>
|
---|
| 64 |
|
---|
| 65 | <sect3><title>Configuration Information</title>
|
---|
| 66 |
|
---|
| 67 | <para>The following configuration file defines various <acronym>NTP</acronym>
|
---|
| 68 | stratum 2 servers with open access from different continents. It also
|
---|
| 69 | creates a drift file where <command>ntpd</command> stores the frequency
|
---|
| 70 | offset. Since the documentation included with the package is sparse,
|
---|
| 71 | visit the <acronym>NTP</acronym> website at
|
---|
| 72 | <ulink url="http://www.ntp.org/"/> for more information.</para>
|
---|
| 73 |
|
---|
| 74 | <screen><userinput><command>cat > /etc/ntp.conf << "EOF"</command>
|
---|
| 75 | # Africa
|
---|
| 76 | server tock.nml.csir.co.za
|
---|
| 77 |
|
---|
| 78 | # Asia
|
---|
| 79 | server ntp.shim.org
|
---|
| 80 |
|
---|
| 81 | # Australia
|
---|
| 82 | server ntp.saard.net
|
---|
| 83 |
|
---|
| 84 | # Europe
|
---|
| 85 | server ntp.tuxfamily.net
|
---|
| 86 |
|
---|
| 87 | # North America
|
---|
| 88 | server clock.psu.edu
|
---|
| 89 |
|
---|
| 90 | driftfile /var/cache/ntp.drift
|
---|
| 91 | <command>EOF</command></userinput></screen>
|
---|
| 92 | </sect3>
|
---|
| 93 |
|
---|
| 94 | <sect3><title>Synchronizing the time</title>
|
---|
| 95 |
|
---|
| 96 | <para>There are two options. Option one is to run <command>ntpd</command>
|
---|
| 97 | continuously and allow it to synchronize the time in a gradual manner. The other
|
---|
| 98 | option is to run <command>ntpd</command> periodically (using cron)
|
---|
| 99 | and update the time each time <command>ntpd</command> is scheduled.</para>
|
---|
| 100 |
|
---|
| 101 | <para>If you choose Option one, then install the
|
---|
| 102 | <filename>/etc/rc.d/init.d/ntp</filename>
|
---|
| 103 | init script included in the
|
---|
| 104 | <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
[8039b66] | 105 |
|
---|
[d47e7ea9] | 106 | <screen><userinput><command>make install-ntp</command></userinput></screen>
|
---|
| 107 |
|
---|
| 108 | <para>If you prefer to run ntpd periodically, add the following command to
|
---|
| 109 | root's <filename>crontab</filename>:</para>
|
---|
| 110 | <screen><userinput>ntpd -q</userinput></screen>
|
---|
| 111 |
|
---|
[8039b66] | 112 | <para>Execute the following command if you would like to set the
|
---|
| 113 | hardware clock at shutdown and reboot based on the current system
|
---|
| 114 | time:</para>
|
---|
| 115 |
|
---|
[10f89cee] | 116 | <screen><userinput><command>ln -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &&
|
---|
| 117 | ln -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock</command></userinput></screen>
|
---|
[8039b66] | 118 |
|
---|
| 119 | <para>The other way around is already set up by
|
---|
| 120 | <acronym>LFS</acronym>.</para>
|
---|
| 121 |
|
---|
[d47e7ea9] | 122 | </sect3>
|
---|
| 123 |
|
---|
| 124 | </sect2>
|
---|
| 125 |
|
---|
| 126 | <sect2>
|
---|
| 127 | <title>Contents</title>
|
---|
| 128 |
|
---|
| 129 | <para>The <application><acronym>NTP</acronym></application> package
|
---|
| 130 | contains <command>ntp-wait</command>, <command>ntptrace</command>,
|
---|
| 131 | <command>ntpd</command>, <command>ntpdate</command>,
|
---|
| 132 | <command>ntpdc</command>, <command>ntpq</command>,
|
---|
| 133 | <command>ntptime</command>, <command>tickadj</command> and
|
---|
| 134 | <command>ntp-keygen</command>.</para>
|
---|
| 135 |
|
---|
| 136 | </sect2>
|
---|
| 137 |
|
---|
| 138 | <sect2><title>Description</title>
|
---|
| 139 |
|
---|
| 140 | <sect3><title>ntp-wait</title>
|
---|
| 141 | <para><command>ntp-wait</command> is useful at boot time, to delay the
|
---|
| 142 | boot sequence until <command>ntpd</command> has set the
|
---|
| 143 | time.</para></sect3>
|
---|
| 144 |
|
---|
| 145 | <sect3><title>ntptrace</title>
|
---|
| 146 | <para><command>ntptrace</command> traces a chain of
|
---|
| 147 | <acronym>NTP</acronym> servers back to the primary source.</para></sect3>
|
---|
| 148 |
|
---|
| 149 | <sect3><title>ntpd</title>
|
---|
| 150 | <para><command>ntpd</command> is a NTP daemon that runs in the
|
---|
| 151 | background and keeps the date and time synchronized based on response
|
---|
| 152 | from configured <acronym>NTP</acronym> servers. It also functions as a
|
---|
| 153 | <acronym>NTP</acronym> server.</para></sect3>
|
---|
| 154 |
|
---|
| 155 | <sect3><title>ntpdate</title>
|
---|
| 156 | <para><command>ntpdate</command> is a client program that sets the date
|
---|
| 157 | and time based on the response from an <acronym>NTP</acronym> server.
|
---|
| 158 | This command is deprecated.</para></sect3>
|
---|
| 159 |
|
---|
| 160 | <sect3><title>ntpdc</title>
|
---|
| 161 | <para><command>ntpdc</command> is used to query the
|
---|
| 162 | <acronym>NTP</acronym> daemon about its current state and to request
|
---|
| 163 | changes in that state.</para></sect3>
|
---|
| 164 |
|
---|
| 165 | <sect3><title>ntpq</title>
|
---|
| 166 | <para><command>ntpq</command> is an utility program used to monitor
|
---|
| 167 | <command>ntpd</command> operations and determine
|
---|
| 168 | performance.</para></sect3>
|
---|
| 169 |
|
---|
| 170 | <sect3><title>ntptime</title>
|
---|
| 171 | <para><command>ntptime</command> reads and displays time-related
|
---|
| 172 | kernel variables.</para></sect3>
|
---|
| 173 |
|
---|
| 174 | <sect3><title>tickadj</title>
|
---|
| 175 | <para><command>tickadj</command> reads, and optionally modifies,
|
---|
| 176 | several timekeeping-related variables in older kernels that do not have
|
---|
| 177 | support for precision timekeeping.</para></sect3>
|
---|
| 178 |
|
---|
| 179 | <sect3><title>ntp-keygen</title>
|
---|
| 180 | <para><command>ntp-keygen</command> generates cryptographic data files
|
---|
| 181 | used by the <acronym>NTP</acronym>v4 authentication and identification
|
---|
| 182 | schemes.</para></sect3>
|
---|
| 183 |
|
---|
| 184 | </sect2>
|
---|
[39f01ca] | 185 |
|
---|
| 186 | </sect1>
|
---|