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