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