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