source: basicnet/netprogs/ntp.xml@ a88b03e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since a88b03e was a88b03e, checked in by Dan Nichilson <dnicholson@…>, 16 years ago

Add pidfile directive ntp.conf. See ticket #2444.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@7266 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 10.6 KB
RevLine 
[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">
[ea804bc]8 <!ENTITY ntp-download-ftp " ">
9 <!-- <!ENTITY ntp-download-ftp "ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-4.2/ntp-&ntp-version;.tar.gz"> -->
[36474cb]10 <!ENTITY ntp-md5sum "6f381e3764eac481bed9cf7e4d508952">
11 <!ENTITY ntp-size "3.3 MB">
12 <!ENTITY ntp-buildsize "27.2 MB">
[9d91468a]13 <!ENTITY ntp-time "0.4 SBU">
[d47e7ea9]14]>
15
[619dd53]16<sect1 id="ntp" xreflabel="NTP-&ntp-version;">
[dc6715a]17 <?dbhtml filename="ntp.html"?>
[56ab82c]18
[dc6715a]19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
[56ab82c]23
[dc6715a]24 <title>NTP-&ntp-version;</title>
[56ab82c]25
[dc6715a]26 <indexterm zone="ntp">
27 <primary sortas="a-NTP">NTP</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to NTP</title>
[56ab82c]32
33 <para>The <application>NTP</application> package contains a
34 client and server to keep the time synchronized between various computers over
35 a network. This package is the official reference implementation of the
[dc6715a]36 NTP protocol.</para>
[56ab82c]37
[dc6715a]38 <bridgehead renderas="sect3">Package Information</bridgehead>
39 <itemizedlist spacing="compact">
40 <listitem>
41 <para>Download (HTTP): <ulink url="&ntp-download-http;"/></para>
42 </listitem>
43 <listitem>
44 <para>Download (FTP): <ulink url="&ntp-download-ftp;"/></para>
45 </listitem>
46 <listitem>
47 <para>Download MD5 sum: &ntp-md5sum;</para>
48 </listitem>
49 <listitem>
50 <para>Download size: &ntp-size;</para>
51 </listitem>
52 <listitem>
53 <para>Estimated disk space required: &ntp-buildsize;</para>
54 </listitem>
55 <listitem>
[2174baa]56 <para>Estimated build time: &ntp-time;</para>
57 </listitem>
[dc6715a]58 </itemizedlist>
[56ab82c]59
[9d91468a]60<!--
[abf1070b]61 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
62 <itemizedlist spacing='compact'>
63 <listitem>
64 <para>Required patch: <ulink
65 url="&patch-root;/ntp-&ntp-version;-gcc4-1.patch"/></para>
66 </listitem>
67 </itemizedlist>
[9d91468a]68-->
[abf1070b]69
[db0eb6a]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">
81 <title>Installation of NTP</title>
82
[56ab82c]83 <para>Install <application>NTP</application> by running
[dc6715a]84 the following commands:</para>
85
[36474cb]86<screen><userinput>./configure --prefix=/usr --sysconfdir=/etc \
87 --with-binsubdir=sbin &amp;&amp;
[11cf9f2]88make</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 &amp;&amp;
95install -v -m755 -d /usr/share/doc/ntp-&ntp-version; &amp;&amp;
[36474cb]96cp -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">
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
[a88b03e]126 <para>The following configuration file defines various NTP servers
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,
131 visit the NTP website at <ulink url="http://www.ntp.org/"/> and
132 <ulink url="http://www.pool.ntp.org/"/> for more information.</para>
[dc6715a]133
134<screen role="root"><userinput>cat &gt; /etc/ntp.conf &lt;&lt; "EOF"
135<literal># Africa
[d47e7ea9]136server tock.nml.csir.co.za
137
138# Asia
[bca6dfb6]139server 0.asia.pool.ntp.org
[d47e7ea9]140
141# Australia
[bca6dfb6]142server 0.oceania.pool.ntp.org
[56ab82c]143
[d47e7ea9]144# Europe
[ea57941f]145server 0.europe.pool.ntp.org
[d47e7ea9]146
147# North America
[ea57941f]148server 0.north-america.pool.ntp.org
149
150# South America
[bca6dfb6]151server 2.south-america.pool.ntp.org
[d47e7ea9]152
[dc6715a]153driftfile /var/cache/ntp.drift</literal>
[a88b03e]154pidfile /var/run/ntpd.pid
[dc6715a]155EOF</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
176<screen role="root"><userinput>make install-ntp</userinput></screen>
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 &amp;&amp;
188ln -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>
[56ab82c]242 <para>is a NTP daemon that runs in the background and keeps
243 the date and time synchronized based on response from configured
[dc6715a]244 NTP servers. It also functions as a NTP server.</para>
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
[dc6715a]255 the response from an NTP server. This command is deprecated.</para>
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>
[56ab82c]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>
297 <para>traces a chain of NTP servers back to the primary source.</para>
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>
Note: See TracBrowser for help on using the repository browser.