[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 |
|
---|
[9d91468a] | 7 | <!ENTITY ntp-download-http "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-stable-&ntp-version;-20060224.tar.gz">
|
---|
| 8 | <!ENTITY ntp-download-ftp "ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-stable-&ntp-version;-20060224.tar.gz">
|
---|
| 9 | <!ENTITY ntp-md5sum "49d4a704b49dc1ef2a7ec0b7938c3ae1">
|
---|
| 10 | <!ENTITY ntp-size "2.3 MB">
|
---|
| 11 | <!ENTITY ntp-buildsize "22.1 MB">
|
---|
| 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 |
|
---|
[9d91468a] | 85 | <screen><userinput>./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 |
|
---|
[ea57941f] | 116 | <para>The following configuration file defines various NTP servers with
|
---|
| 117 | open access from different continents. It also creates a drift file where
|
---|
| 118 | <command>ntpd</command> stores the frequency offset. Since the
|
---|
| 119 | documentation included with the package is sparse, visit the NTP website
|
---|
| 120 | at <ulink url="http://www.ntp.org/"/> and <ulink
|
---|
| 121 | url="http://www.pool.ntp.org/"/> for more information.</para>
|
---|
[dc6715a] | 122 |
|
---|
| 123 | <screen role="root"><userinput>cat > /etc/ntp.conf << "EOF"
|
---|
| 124 | <literal># Africa
|
---|
[d47e7ea9] | 125 | server tock.nml.csir.co.za
|
---|
| 126 |
|
---|
| 127 | # Asia
|
---|
[bca6dfb6] | 128 | server 0.asia.pool.ntp.org
|
---|
[d47e7ea9] | 129 |
|
---|
| 130 | # Australia
|
---|
[bca6dfb6] | 131 | server 0.oceania.pool.ntp.org
|
---|
[56ab82c] | 132 |
|
---|
[d47e7ea9] | 133 | # Europe
|
---|
[ea57941f] | 134 | server 0.europe.pool.ntp.org
|
---|
[d47e7ea9] | 135 |
|
---|
| 136 | # North America
|
---|
[ea57941f] | 137 | server 0.north-america.pool.ntp.org
|
---|
| 138 |
|
---|
| 139 | # South America
|
---|
[bca6dfb6] | 140 | server 2.south-america.pool.ntp.org
|
---|
[d47e7ea9] | 141 |
|
---|
[dc6715a] | 142 | driftfile /var/cache/ntp.drift</literal>
|
---|
| 143 | EOF</userinput></screen>
|
---|
| 144 |
|
---|
| 145 | </sect3>
|
---|
[56ab82c] | 146 |
|
---|
[dc6715a] | 147 | <sect3 id="ntp-init">
|
---|
| 148 | <title>Synchronizing the Time</title>
|
---|
| 149 |
|
---|
| 150 | <para>There are two options. Option one is to run <command>ntpd</command>
|
---|
[56ab82c] | 151 | continuously and allow it to synchronize the time in a gradual manner. The
|
---|
[dc6715a] | 152 | other option is to run <command>ntpd</command> periodically (using cron)
|
---|
| 153 | and update the time each time <command>ntpd</command> is scheduled.</para>
|
---|
[56ab82c] | 154 |
|
---|
| 155 | <para>If you choose Option one, then install the
|
---|
[dc6715a] | 156 | <filename>/etc/rc.d/init.d/ntp</filename>
|
---|
| 157 | init script included in the
|
---|
[5254d12] | 158 | <xref linkend="bootscripts"/> package.</para>
|
---|
[56ab82c] | 159 |
|
---|
| 160 | <indexterm zone="ntp ntp-init">
|
---|
[dc6715a] | 161 | <primary sortas="f-ntp">ntp</primary>
|
---|
[56ab82c] | 162 | </indexterm>
|
---|
[dc6715a] | 163 |
|
---|
| 164 | <screen role="root"><userinput>make install-ntp</userinput></screen>
|
---|
| 165 |
|
---|
[56ab82c] | 166 | <para>If you prefer to run <command>ntpd</command> periodically, add the
|
---|
| 167 | following command to <systemitem class="username">root</systemitem>'s
|
---|
[dc6715a] | 168 | <filename>crontab</filename>:</para>
|
---|
[56ab82c] | 169 |
|
---|
[dc6715a] | 170 | <screen><literal>ntpd -q</literal></screen>
|
---|
| 171 |
|
---|
| 172 | <para>Execute the following command if you would like to set the
|
---|
[339fbfb9] | 173 | hardware clock to the current system time at shutdown and reboot:</para>
|
---|
[dc6715a] | 174 |
|
---|
[e3353b3] | 175 | <screen role="root"><userinput>ln -v -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &&
|
---|
| 176 | ln -v -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock</userinput></screen>
|
---|
[dc6715a] | 177 |
|
---|
| 178 | <para>The other way around is already set up by LFS.</para>
|
---|
[56ab82c] | 179 |
|
---|
[dc6715a] | 180 | </sect3>
|
---|
[56ab82c] | 181 |
|
---|
[dc6715a] | 182 | </sect2>
|
---|
[56ab82c] | 183 |
|
---|
[dc6715a] | 184 | <sect2 role="content">
|
---|
| 185 | <title>Contents</title>
|
---|
[56ab82c] | 186 |
|
---|
[dc6715a] | 187 | <segmentedlist>
|
---|
| 188 | <segtitle>Installed Programs</segtitle>
|
---|
| 189 | <segtitle>Installed Libraries</segtitle>
|
---|
[22292f3a] | 190 | <segtitle>Installed Directory</segtitle>
|
---|
[56ab82c] | 191 |
|
---|
[dc6715a] | 192 | <seglistitem>
|
---|
[56ab82c] | 193 | <seg>ntp-keygen, ntp-wait, ntpd, ntpdate, ntpdc, ntpq,
|
---|
[dc6715a] | 194 | ntptime, ntptrace, and tickadj</seg>
|
---|
| 195 | <seg>None</seg>
|
---|
[22292f3a] | 196 | <seg>/usr/share/doc/ntp-&ntp-version;</seg>
|
---|
[dc6715a] | 197 | </seglistitem>
|
---|
| 198 | </segmentedlist>
|
---|
[56ab82c] | 199 |
|
---|
[dc6715a] | 200 | <variablelist>
|
---|
| 201 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 202 | <?dbfo list-presentation="list"?>
|
---|
| 203 | <?dbhtml list-presentation="table"?>
|
---|
[56ab82c] | 204 |
|
---|
[dc6715a] | 205 | <varlistentry id="ntp-keygen">
|
---|
| 206 | <term><command>ntp-keygen</command></term>
|
---|
| 207 | <listitem>
|
---|
[56ab82c] | 208 | <para>generates cryptographic data files used by the NTPv4 authentication
|
---|
[dc6715a] | 209 | and identification schemes.</para>
|
---|
| 210 | <indexterm zone="ntp ntp-keygen">
|
---|
| 211 | <primary sortas="b-ntp-keygen">ntp-keygen</primary>
|
---|
| 212 | </indexterm>
|
---|
| 213 | </listitem>
|
---|
| 214 | </varlistentry>
|
---|
[56ab82c] | 215 |
|
---|
[dc6715a] | 216 | <varlistentry id="ntp-wait">
|
---|
| 217 | <term><command>ntp-wait</command></term>
|
---|
| 218 | <listitem>
|
---|
[56ab82c] | 219 | <para>is useful at boot time, to delay the boot sequence until
|
---|
[dc6715a] | 220 | <command>ntpd</command> has set the time.</para>
|
---|
| 221 | <indexterm zone="ntp ntp-wait">
|
---|
| 222 | <primary sortas="b-ntp-wait">ntp-wait</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 | </listitem>
|
---|
| 225 | </varlistentry>
|
---|
[56ab82c] | 226 |
|
---|
[dc6715a] | 227 | <varlistentry id="ntpd">
|
---|
| 228 | <term><command>ntpd</command></term>
|
---|
| 229 | <listitem>
|
---|
[56ab82c] | 230 | <para>is a NTP daemon that runs in the background and keeps
|
---|
| 231 | the date and time synchronized based on response from configured
|
---|
[dc6715a] | 232 | NTP servers. It also functions as a NTP server.</para>
|
---|
| 233 | <indexterm zone="ntp ntpd">
|
---|
| 234 | <primary sortas="b-ntpd">ntpd</primary>
|
---|
| 235 | </indexterm>
|
---|
| 236 | </listitem>
|
---|
| 237 | </varlistentry>
|
---|
[56ab82c] | 238 |
|
---|
[dc6715a] | 239 | <varlistentry id="ntpdate">
|
---|
| 240 | <term><command>ntpdate</command></term>
|
---|
| 241 | <listitem>
|
---|
[56ab82c] | 242 | <para>is a client program that sets the date and time based on
|
---|
[dc6715a] | 243 | the response from an NTP server. This command is deprecated.</para>
|
---|
| 244 | <indexterm zone="ntp ntpdate">
|
---|
| 245 | <primary sortas="b-ntpdate">ntpdate</primary>
|
---|
| 246 | </indexterm>
|
---|
| 247 | </listitem>
|
---|
| 248 | </varlistentry>
|
---|
[56ab82c] | 249 |
|
---|
[dc6715a] | 250 | <varlistentry id="ntpdc">
|
---|
| 251 | <term><command>ntpdc</command></term>
|
---|
| 252 | <listitem>
|
---|
[56ab82c] | 253 | <para>is used to query the NTP daemon about its current state
|
---|
[dc6715a] | 254 | and to request changes in that state.</para>
|
---|
| 255 | <indexterm zone="ntp ntpdc">
|
---|
| 256 | <primary sortas="b-ntpdc">ntpdc</primary>
|
---|
| 257 | </indexterm>
|
---|
| 258 | </listitem>
|
---|
| 259 | </varlistentry>
|
---|
[56ab82c] | 260 |
|
---|
[dc6715a] | 261 | <varlistentry id="ntpq">
|
---|
| 262 | <term><command>ntpq</command></term>
|
---|
| 263 | <listitem>
|
---|
[56ab82c] | 264 | <para>is an utility program used to monitor <command>ntpd</command>
|
---|
[dc6715a] | 265 | operations and determine performance.</para>
|
---|
| 266 | <indexterm zone="ntp ntpq">
|
---|
| 267 | <primary sortas="b-ntpq">ntpq</primary>
|
---|
| 268 | </indexterm>
|
---|
| 269 | </listitem>
|
---|
| 270 | </varlistentry>
|
---|
[56ab82c] | 271 |
|
---|
[dc6715a] | 272 | <varlistentry id="ntptime">
|
---|
| 273 | <term><command>ntptime</command></term>
|
---|
| 274 | <listitem>
|
---|
| 275 | <para>reads and displays time-related kernel variables.</para>
|
---|
| 276 | <indexterm zone="ntp ntptime">
|
---|
| 277 | <primary sortas="b-ntptime">ntptime</primary>
|
---|
| 278 | </indexterm>
|
---|
| 279 | </listitem>
|
---|
| 280 | </varlistentry>
|
---|
[56ab82c] | 281 |
|
---|
[dc6715a] | 282 | <varlistentry id="ntptrace">
|
---|
| 283 | <term><command>ntptrace</command></term>
|
---|
| 284 | <listitem>
|
---|
| 285 | <para>traces a chain of NTP servers back to the primary source.</para>
|
---|
| 286 | <indexterm zone="ntp ntptrace">
|
---|
[56ab82c] | 287 | <primary sortas="b-ntptrace">ntptrace</primary>
|
---|
[dc6715a] | 288 | </indexterm>
|
---|
| 289 | </listitem>
|
---|
| 290 | </varlistentry>
|
---|
[56ab82c] | 291 |
|
---|
[dc6715a] | 292 | <varlistentry id="tickadj">
|
---|
| 293 | <term><command>tickadj</command></term>
|
---|
| 294 | <listitem>
|
---|
[56ab82c] | 295 | <para>reads, and optionally modifies, several timekeeping-related
|
---|
| 296 | variables in older kernels that do not have support for precision
|
---|
[dc6715a] | 297 | timekeeping.</para>
|
---|
| 298 | <indexterm zone="ntp tickadj">
|
---|
| 299 | <primary sortas="b-tickadj">tickadj</primary>
|
---|
| 300 | </indexterm>
|
---|
| 301 | </listitem>
|
---|
| 302 | </varlistentry>
|
---|
[56ab82c] | 303 |
|
---|
[dc6715a] | 304 | </variablelist>
|
---|
[56ab82c] | 305 |
|
---|
[dc6715a] | 306 | </sect2>
|
---|
[56ab82c] | 307 |
|
---|
[39f01ca] | 308 | </sect1>
|
---|