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