[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;">
|
---|
[dc6715a] | 16 | <?dbhtml filename="ntp.html"?>
|
---|
[56ab82c] | 17 |
|
---|
[dc6715a] | 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
[56ab82c] | 22 |
|
---|
[dc6715a] | 23 | <title>NTP-&ntp-version;</title>
|
---|
[56ab82c] | 24 |
|
---|
[dc6715a] | 25 | <indexterm zone="ntp">
|
---|
| 26 | <primary sortas="a-NTP">NTP</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to NTP</title>
|
---|
[56ab82c] | 31 |
|
---|
| 32 | <para>The <application>NTP</application> package contains a
|
---|
| 33 | client and server to keep the time synchronized between various computers over
|
---|
| 34 | a network. This package is the official reference implementation of the
|
---|
[dc6715a] | 35 | NTP protocol.</para>
|
---|
[56ab82c] | 36 |
|
---|
[dc6715a] | 37 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 38 | <itemizedlist spacing="compact">
|
---|
| 39 | <listitem>
|
---|
| 40 | <para>Download (HTTP): <ulink url="&ntp-download-http;"/></para>
|
---|
| 41 | </listitem>
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>Download (FTP): <ulink url="&ntp-download-ftp;"/></para>
|
---|
| 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>Download MD5 sum: &ntp-md5sum;</para>
|
---|
| 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>Download size: &ntp-size;</para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Estimated disk space required: &ntp-buildsize;</para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
[2174baa] | 55 | <para>Estimated build time: &ntp-time;</para>
|
---|
| 56 | </listitem>
|
---|
[dc6715a] | 57 | </itemizedlist>
|
---|
[56ab82c] | 58 |
|
---|
[db0eb6a] | 59 | <bridgehead renderas="sect3">NTP Dependencies</bridgehead>
|
---|
[56ab82c] | 60 |
|
---|
[dc6715a] | 61 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 62 | <para><xref linkend="openssl"/></para>
|
---|
[56ab82c] | 63 |
|
---|
[dc6715a] | 64 | </sect2>
|
---|
[56ab82c] | 65 |
|
---|
[dc6715a] | 66 | <sect2 role="installation">
|
---|
| 67 | <title>Installation of NTP</title>
|
---|
| 68 |
|
---|
[56ab82c] | 69 | <para>Install <application>NTP</application> by running
|
---|
[dc6715a] | 70 | the following commands:</para>
|
---|
| 71 |
|
---|
| 72 | <screen><userinput>./configure --prefix=/usr --bindir=/usr/sbin \
|
---|
[d47e7ea9] | 73 | --sysconfdir=/etc &&
|
---|
[11cf9f2] | 74 | make</userinput></screen>
|
---|
| 75 |
|
---|
| 76 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
[56ab82c] | 77 |
|
---|
[11cf9f2] | 78 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[56ab82c] | 79 |
|
---|
[22292f3a] | 80 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 81 |
|
---|
| 82 | <para>Additionally, install the documentation by executing the following
|
---|
| 83 | as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 84 |
|
---|
| 85 | <screen role="root"><userinput>install -v -m755 -d /usr/share/doc/ntp-&ntp-version; &&
|
---|
[45d5ee9] | 86 | cp -v -R html /usr/share/doc/ntp-&ntp-version;/</userinput></screen>
|
---|
[11cf9f2] | 87 |
|
---|
[dc6715a] | 88 | </sect2>
|
---|
[56ab82c] | 89 |
|
---|
[dc6715a] | 90 | <sect2 role="configuration">
|
---|
| 91 | <title>Configuring NTP</title>
|
---|
[56ab82c] | 92 |
|
---|
[dc6715a] | 93 | <sect3 id="ntp-config">
|
---|
| 94 | <title>Config Files</title>
|
---|
[56ab82c] | 95 |
|
---|
[dc6715a] | 96 | <para><filename>/etc/ntp.conf</filename></para>
|
---|
[56ab82c] | 97 |
|
---|
[dc6715a] | 98 | <indexterm zone="ntp ntp-config">
|
---|
| 99 | <primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
|
---|
| 100 | </indexterm>
|
---|
[56ab82c] | 101 |
|
---|
[dc6715a] | 102 | </sect3>
|
---|
[56ab82c] | 103 |
|
---|
[dc6715a] | 104 | <sect3>
|
---|
| 105 | <title>Configuration Information</title>
|
---|
| 106 |
|
---|
| 107 | <para>The following configuration file defines various NTP
|
---|
| 108 | stratum 2 servers with open access from different continents. It also
|
---|
| 109 | creates a drift file where <command>ntpd</command> stores the frequency
|
---|
| 110 | offset. Since the documentation included with the package is sparse,
|
---|
| 111 | visit the NTP website at <ulink url="http://www.ntp.org/"/> for more information.</para>
|
---|
| 112 |
|
---|
| 113 | <screen role="root"><userinput>cat > /etc/ntp.conf << "EOF"
|
---|
| 114 | <literal># Africa
|
---|
[d47e7ea9] | 115 | server tock.nml.csir.co.za
|
---|
| 116 |
|
---|
| 117 | # Asia
|
---|
| 118 | server ntp.shim.org
|
---|
| 119 |
|
---|
| 120 | # Australia
|
---|
| 121 | server ntp.saard.net
|
---|
[56ab82c] | 122 |
|
---|
[d47e7ea9] | 123 | # Europe
|
---|
| 124 | server ntp.tuxfamily.net
|
---|
| 125 |
|
---|
| 126 | # North America
|
---|
| 127 | server clock.psu.edu
|
---|
| 128 |
|
---|
[dc6715a] | 129 | driftfile /var/cache/ntp.drift</literal>
|
---|
| 130 | EOF</userinput></screen>
|
---|
| 131 |
|
---|
| 132 | </sect3>
|
---|
[56ab82c] | 133 |
|
---|
[dc6715a] | 134 | <sect3 id="ntp-init">
|
---|
| 135 | <title>Synchronizing the Time</title>
|
---|
| 136 |
|
---|
| 137 | <para>There are two options. Option one is to run <command>ntpd</command>
|
---|
[56ab82c] | 138 | continuously and allow it to synchronize the time in a gradual manner. The
|
---|
[dc6715a] | 139 | other option is to run <command>ntpd</command> periodically (using cron)
|
---|
| 140 | and update the time each time <command>ntpd</command> is scheduled.</para>
|
---|
[56ab82c] | 141 |
|
---|
| 142 | <para>If you choose Option one, then install the
|
---|
[dc6715a] | 143 | <filename>/etc/rc.d/init.d/ntp</filename>
|
---|
| 144 | init script included in the
|
---|
| 145 | <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
[56ab82c] | 146 |
|
---|
| 147 | <indexterm zone="ntp ntp-init">
|
---|
[dc6715a] | 148 | <primary sortas="f-ntp">ntp</primary>
|
---|
[56ab82c] | 149 | </indexterm>
|
---|
[dc6715a] | 150 |
|
---|
| 151 | <screen role="root"><userinput>make install-ntp</userinput></screen>
|
---|
| 152 |
|
---|
[56ab82c] | 153 | <para>If you prefer to run <command>ntpd</command> periodically, add the
|
---|
| 154 | following command to <systemitem class="username">root</systemitem>'s
|
---|
[dc6715a] | 155 | <filename>crontab</filename>:</para>
|
---|
[56ab82c] | 156 |
|
---|
[dc6715a] | 157 | <screen><literal>ntpd -q</literal></screen>
|
---|
| 158 |
|
---|
| 159 | <para>Execute the following command if you would like to set the
|
---|
| 160 | hardware clock at shutdown and reboot based on the current system
|
---|
| 161 | time:</para>
|
---|
| 162 |
|
---|
[e3353b3] | 163 | <screen role="root"><userinput>ln -v -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &&
|
---|
| 164 | ln -v -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock</userinput></screen>
|
---|
[dc6715a] | 165 |
|
---|
| 166 | <para>The other way around is already set up by LFS.</para>
|
---|
[56ab82c] | 167 |
|
---|
[dc6715a] | 168 | </sect3>
|
---|
[56ab82c] | 169 |
|
---|
[dc6715a] | 170 | </sect2>
|
---|
[56ab82c] | 171 |
|
---|
[dc6715a] | 172 | <sect2 role="content">
|
---|
| 173 | <title>Contents</title>
|
---|
[56ab82c] | 174 |
|
---|
[dc6715a] | 175 | <segmentedlist>
|
---|
| 176 | <segtitle>Installed Programs</segtitle>
|
---|
| 177 | <segtitle>Installed Libraries</segtitle>
|
---|
[22292f3a] | 178 | <segtitle>Installed Directory</segtitle>
|
---|
[56ab82c] | 179 |
|
---|
[dc6715a] | 180 | <seglistitem>
|
---|
[56ab82c] | 181 | <seg>ntp-keygen, ntp-wait, ntpd, ntpdate, ntpdc, ntpq,
|
---|
[dc6715a] | 182 | ntptime, ntptrace, and tickadj</seg>
|
---|
| 183 | <seg>None</seg>
|
---|
[22292f3a] | 184 | <seg>/usr/share/doc/ntp-&ntp-version;</seg>
|
---|
[dc6715a] | 185 | </seglistitem>
|
---|
| 186 | </segmentedlist>
|
---|
[56ab82c] | 187 |
|
---|
[dc6715a] | 188 | <variablelist>
|
---|
| 189 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 190 | <?dbfo list-presentation="list"?>
|
---|
| 191 | <?dbhtml list-presentation="table"?>
|
---|
[56ab82c] | 192 |
|
---|
[dc6715a] | 193 | <varlistentry id="ntp-keygen">
|
---|
| 194 | <term><command>ntp-keygen</command></term>
|
---|
| 195 | <listitem>
|
---|
[56ab82c] | 196 | <para>generates cryptographic data files used by the NTPv4 authentication
|
---|
[dc6715a] | 197 | and identification schemes.</para>
|
---|
| 198 | <indexterm zone="ntp ntp-keygen">
|
---|
| 199 | <primary sortas="b-ntp-keygen">ntp-keygen</primary>
|
---|
| 200 | </indexterm>
|
---|
| 201 | </listitem>
|
---|
| 202 | </varlistentry>
|
---|
[56ab82c] | 203 |
|
---|
[dc6715a] | 204 | <varlistentry id="ntp-wait">
|
---|
| 205 | <term><command>ntp-wait</command></term>
|
---|
| 206 | <listitem>
|
---|
[56ab82c] | 207 | <para>is useful at boot time, to delay the boot sequence until
|
---|
[dc6715a] | 208 | <command>ntpd</command> has set the time.</para>
|
---|
| 209 | <indexterm zone="ntp ntp-wait">
|
---|
| 210 | <primary sortas="b-ntp-wait">ntp-wait</primary>
|
---|
| 211 | </indexterm>
|
---|
| 212 | </listitem>
|
---|
| 213 | </varlistentry>
|
---|
[56ab82c] | 214 |
|
---|
[dc6715a] | 215 | <varlistentry id="ntpd">
|
---|
| 216 | <term><command>ntpd</command></term>
|
---|
| 217 | <listitem>
|
---|
[56ab82c] | 218 | <para>is a NTP daemon that runs in the background and keeps
|
---|
| 219 | the date and time synchronized based on response from configured
|
---|
[dc6715a] | 220 | NTP servers. It also functions as a NTP server.</para>
|
---|
| 221 | <indexterm zone="ntp ntpd">
|
---|
| 222 | <primary sortas="b-ntpd">ntpd</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 | </listitem>
|
---|
| 225 | </varlistentry>
|
---|
[56ab82c] | 226 |
|
---|
[dc6715a] | 227 | <varlistentry id="ntpdate">
|
---|
| 228 | <term><command>ntpdate</command></term>
|
---|
| 229 | <listitem>
|
---|
[56ab82c] | 230 | <para>is a client program that sets the date and time based on
|
---|
[dc6715a] | 231 | the response from an NTP server. This command is deprecated.</para>
|
---|
| 232 | <indexterm zone="ntp ntpdate">
|
---|
| 233 | <primary sortas="b-ntpdate">ntpdate</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 | </listitem>
|
---|
| 236 | </varlistentry>
|
---|
[56ab82c] | 237 |
|
---|
[dc6715a] | 238 | <varlistentry id="ntpdc">
|
---|
| 239 | <term><command>ntpdc</command></term>
|
---|
| 240 | <listitem>
|
---|
[56ab82c] | 241 | <para>is used to query the NTP daemon about its current state
|
---|
[dc6715a] | 242 | and to request changes in that state.</para>
|
---|
| 243 | <indexterm zone="ntp ntpdc">
|
---|
| 244 | <primary sortas="b-ntpdc">ntpdc</primary>
|
---|
| 245 | </indexterm>
|
---|
| 246 | </listitem>
|
---|
| 247 | </varlistentry>
|
---|
[56ab82c] | 248 |
|
---|
[dc6715a] | 249 | <varlistentry id="ntpq">
|
---|
| 250 | <term><command>ntpq</command></term>
|
---|
| 251 | <listitem>
|
---|
[56ab82c] | 252 | <para>is an utility program used to monitor <command>ntpd</command>
|
---|
[dc6715a] | 253 | operations and determine performance.</para>
|
---|
| 254 | <indexterm zone="ntp ntpq">
|
---|
| 255 | <primary sortas="b-ntpq">ntpq</primary>
|
---|
| 256 | </indexterm>
|
---|
| 257 | </listitem>
|
---|
| 258 | </varlistentry>
|
---|
[56ab82c] | 259 |
|
---|
[dc6715a] | 260 | <varlistentry id="ntptime">
|
---|
| 261 | <term><command>ntptime</command></term>
|
---|
| 262 | <listitem>
|
---|
| 263 | <para>reads and displays time-related kernel variables.</para>
|
---|
| 264 | <indexterm zone="ntp ntptime">
|
---|
| 265 | <primary sortas="b-ntptime">ntptime</primary>
|
---|
| 266 | </indexterm>
|
---|
| 267 | </listitem>
|
---|
| 268 | </varlistentry>
|
---|
[56ab82c] | 269 |
|
---|
[dc6715a] | 270 | <varlistentry id="ntptrace">
|
---|
| 271 | <term><command>ntptrace</command></term>
|
---|
| 272 | <listitem>
|
---|
| 273 | <para>traces a chain of NTP servers back to the primary source.</para>
|
---|
| 274 | <indexterm zone="ntp ntptrace">
|
---|
[56ab82c] | 275 | <primary sortas="b-ntptrace">ntptrace</primary>
|
---|
[dc6715a] | 276 | </indexterm>
|
---|
| 277 | </listitem>
|
---|
| 278 | </varlistentry>
|
---|
[56ab82c] | 279 |
|
---|
[dc6715a] | 280 | <varlistentry id="tickadj">
|
---|
| 281 | <term><command>tickadj</command></term>
|
---|
| 282 | <listitem>
|
---|
[56ab82c] | 283 | <para>reads, and optionally modifies, several timekeeping-related
|
---|
| 284 | variables in older kernels that do not have support for precision
|
---|
[dc6715a] | 285 | timekeeping.</para>
|
---|
| 286 | <indexterm zone="ntp tickadj">
|
---|
| 287 | <primary sortas="b-tickadj">tickadj</primary>
|
---|
| 288 | </indexterm>
|
---|
| 289 | </listitem>
|
---|
| 290 | </varlistentry>
|
---|
[56ab82c] | 291 |
|
---|
[dc6715a] | 292 | </variablelist>
|
---|
[56ab82c] | 293 |
|
---|
[dc6715a] | 294 | </sect2>
|
---|
[56ab82c] | 295 |
|
---|
[39f01ca] | 296 | </sect1>
|
---|