[d47e7ea9] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[d47e7ea9] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[36474cb] | 7 | <!ENTITY ntp-download-http "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-&ntp-version;.tar.gz">
|
---|
| 8 | <!ENTITY ntp-download-ftp "ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-4.2/ntp-&ntp-version;.tar.gz">
|
---|
| 9 | <!ENTITY ntp-md5sum "6f381e3764eac481bed9cf7e4d508952">
|
---|
| 10 | <!ENTITY ntp-size "3.3 MB">
|
---|
| 11 | <!ENTITY ntp-buildsize "27.2 MB">
|
---|
[9d91468a] | 12 | <!ENTITY ntp-time "0.4 SBU">
|
---|
[d47e7ea9] | 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 |
|
---|
[9d91468a] | 59 | <!--
|
---|
[abf1070b] | 60 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 61 | <itemizedlist spacing='compact'>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>Required patch: <ulink
|
---|
| 64 | url="&patch-root;/ntp-&ntp-version;-gcc4-1.patch"/></para>
|
---|
| 65 | </listitem>
|
---|
| 66 | </itemizedlist>
|
---|
[9d91468a] | 67 | -->
|
---|
[abf1070b] | 68 |
|
---|
[db0eb6a] | 69 | <bridgehead renderas="sect3">NTP Dependencies</bridgehead>
|
---|
[56ab82c] | 70 |
|
---|
[dc6715a] | 71 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[4dbbf634] | 72 | <para role="optional"><xref linkend="openssl"/></para>
|
---|
[56ab82c] | 73 |
|
---|
[061ec9d] | 74 | <para condition="html" role="usernotes">User Notes:
|
---|
| 75 | <ulink url="&blfs-wiki;/ntp"/></para>
|
---|
| 76 |
|
---|
[dc6715a] | 77 | </sect2>
|
---|
[56ab82c] | 78 |
|
---|
[dc6715a] | 79 | <sect2 role="installation">
|
---|
| 80 | <title>Installation of NTP</title>
|
---|
| 81 |
|
---|
[56ab82c] | 82 | <para>Install <application>NTP</application> by running
|
---|
[dc6715a] | 83 | the following commands:</para>
|
---|
| 84 |
|
---|
[36474cb] | 85 | <screen><userinput>./configure --prefix=/usr --sysconfdir=/etc \
|
---|
| 86 | --with-binsubdir=sbin &&
|
---|
[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; &&
|
---|
[36474cb] | 95 | cp -v -R html/* /usr/share/doc/ntp-&ntp-version;/</userinput></screen>
|
---|
| 96 |
|
---|
| 97 | </sect2>
|
---|
| 98 |
|
---|
| 99 | <sect2 role="commands">
|
---|
| 100 | <title>Command Explanations</title>
|
---|
| 101 |
|
---|
| 102 | <para><parameter>--with-binsubdir=sbin</parameter>: This parameter places
|
---|
| 103 | the administrative programs in <filename
|
---|
| 104 | class="directory">/usr/sbin</filename>.</para>
|
---|
[11cf9f2] | 105 |
|
---|
[dc6715a] | 106 | </sect2>
|
---|
[56ab82c] | 107 |
|
---|
[dc6715a] | 108 | <sect2 role="configuration">
|
---|
| 109 | <title>Configuring NTP</title>
|
---|
[56ab82c] | 110 |
|
---|
[dc6715a] | 111 | <sect3 id="ntp-config">
|
---|
| 112 | <title>Config Files</title>
|
---|
[56ab82c] | 113 |
|
---|
[dc6715a] | 114 | <para><filename>/etc/ntp.conf</filename></para>
|
---|
[56ab82c] | 115 |
|
---|
[dc6715a] | 116 | <indexterm zone="ntp ntp-config">
|
---|
| 117 | <primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
|
---|
| 118 | </indexterm>
|
---|
[56ab82c] | 119 |
|
---|
[dc6715a] | 120 | </sect3>
|
---|
[56ab82c] | 121 |
|
---|
[dc6715a] | 122 | <sect3>
|
---|
| 123 | <title>Configuration Information</title>
|
---|
| 124 |
|
---|
[ea57941f] | 125 | <para>The following configuration file defines various NTP servers with
|
---|
| 126 | open access from different continents. It also creates a drift file where
|
---|
| 127 | <command>ntpd</command> stores the frequency offset. Since the
|
---|
| 128 | documentation included with the package is sparse, visit the NTP website
|
---|
| 129 | at <ulink url="http://www.ntp.org/"/> and <ulink
|
---|
| 130 | url="http://www.pool.ntp.org/"/> for more information.</para>
|
---|
[dc6715a] | 131 |
|
---|
| 132 | <screen role="root"><userinput>cat > /etc/ntp.conf << "EOF"
|
---|
| 133 | <literal># Africa
|
---|
[d47e7ea9] | 134 | server tock.nml.csir.co.za
|
---|
| 135 |
|
---|
| 136 | # Asia
|
---|
[bca6dfb6] | 137 | server 0.asia.pool.ntp.org
|
---|
[d47e7ea9] | 138 |
|
---|
| 139 | # Australia
|
---|
[bca6dfb6] | 140 | server 0.oceania.pool.ntp.org
|
---|
[56ab82c] | 141 |
|
---|
[d47e7ea9] | 142 | # Europe
|
---|
[ea57941f] | 143 | server 0.europe.pool.ntp.org
|
---|
[d47e7ea9] | 144 |
|
---|
| 145 | # North America
|
---|
[ea57941f] | 146 | server 0.north-america.pool.ntp.org
|
---|
| 147 |
|
---|
| 148 | # South America
|
---|
[bca6dfb6] | 149 | server 2.south-america.pool.ntp.org
|
---|
[d47e7ea9] | 150 |
|
---|
[dc6715a] | 151 | driftfile /var/cache/ntp.drift</literal>
|
---|
| 152 | EOF</userinput></screen>
|
---|
| 153 |
|
---|
| 154 | </sect3>
|
---|
[56ab82c] | 155 |
|
---|
[dc6715a] | 156 | <sect3 id="ntp-init">
|
---|
| 157 | <title>Synchronizing the Time</title>
|
---|
| 158 |
|
---|
| 159 | <para>There are two options. Option one is to run <command>ntpd</command>
|
---|
[56ab82c] | 160 | continuously and allow it to synchronize the time in a gradual manner. The
|
---|
[dc6715a] | 161 | other option is to run <command>ntpd</command> periodically (using cron)
|
---|
| 162 | and update the time each time <command>ntpd</command> is scheduled.</para>
|
---|
[56ab82c] | 163 |
|
---|
| 164 | <para>If you choose Option one, then install the
|
---|
[dc6715a] | 165 | <filename>/etc/rc.d/init.d/ntp</filename>
|
---|
| 166 | init script included in the
|
---|
[5254d12] | 167 | <xref linkend="bootscripts"/> package.</para>
|
---|
[56ab82c] | 168 |
|
---|
| 169 | <indexterm zone="ntp ntp-init">
|
---|
[dc6715a] | 170 | <primary sortas="f-ntp">ntp</primary>
|
---|
[56ab82c] | 171 | </indexterm>
|
---|
[dc6715a] | 172 |
|
---|
| 173 | <screen role="root"><userinput>make install-ntp</userinput></screen>
|
---|
| 174 |
|
---|
[56ab82c] | 175 | <para>If you prefer to run <command>ntpd</command> periodically, add the
|
---|
| 176 | following command to <systemitem class="username">root</systemitem>'s
|
---|
[dc6715a] | 177 | <filename>crontab</filename>:</para>
|
---|
[56ab82c] | 178 |
|
---|
[dc6715a] | 179 | <screen><literal>ntpd -q</literal></screen>
|
---|
| 180 |
|
---|
| 181 | <para>Execute the following command if you would like to set the
|
---|
[339fbfb9] | 182 | hardware clock to the current system time at shutdown and reboot:</para>
|
---|
[dc6715a] | 183 |
|
---|
[e3353b3] | 184 | <screen role="root"><userinput>ln -v -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &&
|
---|
| 185 | ln -v -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock</userinput></screen>
|
---|
[dc6715a] | 186 |
|
---|
| 187 | <para>The other way around is already set up by LFS.</para>
|
---|
[56ab82c] | 188 |
|
---|
[dc6715a] | 189 | </sect3>
|
---|
[56ab82c] | 190 |
|
---|
[dc6715a] | 191 | </sect2>
|
---|
[56ab82c] | 192 |
|
---|
[dc6715a] | 193 | <sect2 role="content">
|
---|
| 194 | <title>Contents</title>
|
---|
[56ab82c] | 195 |
|
---|
[dc6715a] | 196 | <segmentedlist>
|
---|
| 197 | <segtitle>Installed Programs</segtitle>
|
---|
| 198 | <segtitle>Installed Libraries</segtitle>
|
---|
[22292f3a] | 199 | <segtitle>Installed Directory</segtitle>
|
---|
[56ab82c] | 200 |
|
---|
[dc6715a] | 201 | <seglistitem>
|
---|
[56ab82c] | 202 | <seg>ntp-keygen, ntp-wait, ntpd, ntpdate, ntpdc, ntpq,
|
---|
[36474cb] | 203 | ntptime, ntptrace, sntp and tickadj</seg>
|
---|
[dc6715a] | 204 | <seg>None</seg>
|
---|
[22292f3a] | 205 | <seg>/usr/share/doc/ntp-&ntp-version;</seg>
|
---|
[dc6715a] | 206 | </seglistitem>
|
---|
| 207 | </segmentedlist>
|
---|
[56ab82c] | 208 |
|
---|
[dc6715a] | 209 | <variablelist>
|
---|
| 210 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 211 | <?dbfo list-presentation="list"?>
|
---|
| 212 | <?dbhtml list-presentation="table"?>
|
---|
[56ab82c] | 213 |
|
---|
[dc6715a] | 214 | <varlistentry id="ntp-keygen">
|
---|
| 215 | <term><command>ntp-keygen</command></term>
|
---|
| 216 | <listitem>
|
---|
[56ab82c] | 217 | <para>generates cryptographic data files used by the NTPv4 authentication
|
---|
[dc6715a] | 218 | and identification schemes.</para>
|
---|
| 219 | <indexterm zone="ntp ntp-keygen">
|
---|
| 220 | <primary sortas="b-ntp-keygen">ntp-keygen</primary>
|
---|
| 221 | </indexterm>
|
---|
| 222 | </listitem>
|
---|
| 223 | </varlistentry>
|
---|
[56ab82c] | 224 |
|
---|
[dc6715a] | 225 | <varlistentry id="ntp-wait">
|
---|
| 226 | <term><command>ntp-wait</command></term>
|
---|
| 227 | <listitem>
|
---|
[56ab82c] | 228 | <para>is useful at boot time, to delay the boot sequence until
|
---|
[dc6715a] | 229 | <command>ntpd</command> has set the time.</para>
|
---|
| 230 | <indexterm zone="ntp ntp-wait">
|
---|
| 231 | <primary sortas="b-ntp-wait">ntp-wait</primary>
|
---|
| 232 | </indexterm>
|
---|
| 233 | </listitem>
|
---|
| 234 | </varlistentry>
|
---|
[56ab82c] | 235 |
|
---|
[dc6715a] | 236 | <varlistentry id="ntpd">
|
---|
| 237 | <term><command>ntpd</command></term>
|
---|
| 238 | <listitem>
|
---|
[56ab82c] | 239 | <para>is a NTP daemon that runs in the background and keeps
|
---|
| 240 | the date and time synchronized based on response from configured
|
---|
[dc6715a] | 241 | NTP servers. It also functions as a NTP server.</para>
|
---|
| 242 | <indexterm zone="ntp ntpd">
|
---|
| 243 | <primary sortas="b-ntpd">ntpd</primary>
|
---|
| 244 | </indexterm>
|
---|
| 245 | </listitem>
|
---|
| 246 | </varlistentry>
|
---|
[56ab82c] | 247 |
|
---|
[dc6715a] | 248 | <varlistentry id="ntpdate">
|
---|
| 249 | <term><command>ntpdate</command></term>
|
---|
| 250 | <listitem>
|
---|
[56ab82c] | 251 | <para>is a client program that sets the date and time based on
|
---|
[dc6715a] | 252 | the response from an NTP server. This command is deprecated.</para>
|
---|
| 253 | <indexterm zone="ntp ntpdate">
|
---|
| 254 | <primary sortas="b-ntpdate">ntpdate</primary>
|
---|
| 255 | </indexterm>
|
---|
| 256 | </listitem>
|
---|
| 257 | </varlistentry>
|
---|
[56ab82c] | 258 |
|
---|
[dc6715a] | 259 | <varlistentry id="ntpdc">
|
---|
| 260 | <term><command>ntpdc</command></term>
|
---|
| 261 | <listitem>
|
---|
[56ab82c] | 262 | <para>is used to query the NTP daemon about its current state
|
---|
[dc6715a] | 263 | and to request changes in that state.</para>
|
---|
| 264 | <indexterm zone="ntp ntpdc">
|
---|
| 265 | <primary sortas="b-ntpdc">ntpdc</primary>
|
---|
| 266 | </indexterm>
|
---|
| 267 | </listitem>
|
---|
| 268 | </varlistentry>
|
---|
[56ab82c] | 269 |
|
---|
[dc6715a] | 270 | <varlistentry id="ntpq">
|
---|
| 271 | <term><command>ntpq</command></term>
|
---|
| 272 | <listitem>
|
---|
[56ab82c] | 273 | <para>is an utility program used to monitor <command>ntpd</command>
|
---|
[dc6715a] | 274 | operations and determine performance.</para>
|
---|
| 275 | <indexterm zone="ntp ntpq">
|
---|
| 276 | <primary sortas="b-ntpq">ntpq</primary>
|
---|
| 277 | </indexterm>
|
---|
| 278 | </listitem>
|
---|
| 279 | </varlistentry>
|
---|
[56ab82c] | 280 |
|
---|
[dc6715a] | 281 | <varlistentry id="ntptime">
|
---|
| 282 | <term><command>ntptime</command></term>
|
---|
| 283 | <listitem>
|
---|
| 284 | <para>reads and displays time-related kernel variables.</para>
|
---|
| 285 | <indexterm zone="ntp ntptime">
|
---|
| 286 | <primary sortas="b-ntptime">ntptime</primary>
|
---|
| 287 | </indexterm>
|
---|
| 288 | </listitem>
|
---|
| 289 | </varlistentry>
|
---|
[56ab82c] | 290 |
|
---|
[dc6715a] | 291 | <varlistentry id="ntptrace">
|
---|
| 292 | <term><command>ntptrace</command></term>
|
---|
| 293 | <listitem>
|
---|
| 294 | <para>traces a chain of NTP servers back to the primary source.</para>
|
---|
| 295 | <indexterm zone="ntp ntptrace">
|
---|
[56ab82c] | 296 | <primary sortas="b-ntptrace">ntptrace</primary>
|
---|
[dc6715a] | 297 | </indexterm>
|
---|
| 298 | </listitem>
|
---|
| 299 | </varlistentry>
|
---|
[56ab82c] | 300 |
|
---|
[36474cb] | 301 | <varlistentry id="sntp">
|
---|
| 302 | <term><command>sntp</command></term>
|
---|
| 303 | <listitem>
|
---|
| 304 | <para>is a Simple Network Time Protocol (SNTP) client.</para>
|
---|
| 305 | <indexterm zone="ntp sntp">
|
---|
| 306 | <primary sortas="b-sntp">sntp</primary>
|
---|
| 307 | </indexterm>
|
---|
| 308 | </listitem>
|
---|
| 309 | </varlistentry>
|
---|
| 310 |
|
---|
[dc6715a] | 311 | <varlistentry id="tickadj">
|
---|
| 312 | <term><command>tickadj</command></term>
|
---|
| 313 | <listitem>
|
---|
[56ab82c] | 314 | <para>reads, and optionally modifies, several timekeeping-related
|
---|
| 315 | variables in older kernels that do not have support for precision
|
---|
[dc6715a] | 316 | timekeeping.</para>
|
---|
| 317 | <indexterm zone="ntp tickadj">
|
---|
| 318 | <primary sortas="b-tickadj">tickadj</primary>
|
---|
| 319 | </indexterm>
|
---|
| 320 | </listitem>
|
---|
| 321 | </varlistentry>
|
---|
[56ab82c] | 322 |
|
---|
[dc6715a] | 323 | </variablelist>
|
---|
[56ab82c] | 324 |
|
---|
[dc6715a] | 325 | </sect2>
|
---|
[56ab82c] | 326 |
|
---|
[39f01ca] | 327 | </sect1>
|
---|