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