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
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
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 " ">
9 <!-- <!ENTITY ntp-download-ftp "ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-4.2/ntp-&ntp-version;.tar.gz"> -->
10 <!ENTITY ntp-md5sum "6f381e3764eac481bed9cf7e4d508952">
11 <!ENTITY ntp-size "3.3 MB">
12 <!ENTITY ntp-buildsize "27.2 MB">
13 <!ENTITY ntp-time "0.4 SBU">
14]>
15
16<sect1 id="ntp" xreflabel="NTP-&ntp-version;">
17 <?dbhtml filename="ntp.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>NTP-&ntp-version;</title>
25
26 <indexterm zone="ntp">
27 <primary sortas="a-NTP">NTP</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to NTP</title>
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
36 NTP protocol.</para>
37
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>
56 <para>Estimated build time: &ntp-time;</para>
57 </listitem>
58 </itemizedlist>
59
60<!--
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>
68-->
69
70 <bridgehead renderas="sect3">NTP Dependencies</bridgehead>
71
72 <bridgehead renderas="sect4">Optional</bridgehead>
73 <para role="optional"><xref linkend="openssl"/></para>
74
75 <para condition="html" role="usernotes">User Notes:
76 <ulink url="&blfs-wiki;/ntp"/></para>
77
78 </sect2>
79
80 <sect2 role="installation">
81 <title>Installation of NTP</title>
82
83 <para>Install <application>NTP</application> by running
84 the following commands:</para>
85
86<screen><userinput>./configure --prefix=/usr --sysconfdir=/etc \
87 --with-binsubdir=sbin &amp;&amp;
88make</userinput></screen>
89
90 <para>To test the results, issue: <command>make check</command>.</para>
91
92 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
93
94<screen role="root"><userinput>make install &amp;&amp;
95install -v -m755 -d /usr/share/doc/ntp-&ntp-version; &amp;&amp;
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>
106
107 </sect2>
108
109 <sect2 role="configuration">
110 <title>Configuring NTP</title>
111
112 <sect3 id="ntp-config">
113 <title>Config Files</title>
114
115 <para><filename>/etc/ntp.conf</filename></para>
116
117 <indexterm zone="ntp ntp-config">
118 <primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
119 </indexterm>
120
121 </sect3>
122
123 <sect3>
124 <title>Configuration Information</title>
125
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>
133
134<screen role="root"><userinput>cat &gt; /etc/ntp.conf &lt;&lt; "EOF"
135<literal># Africa
136server tock.nml.csir.co.za
137
138# Asia
139server 0.asia.pool.ntp.org
140
141# Australia
142server 0.oceania.pool.ntp.org
143
144# Europe
145server 0.europe.pool.ntp.org
146
147# North America
148server 0.north-america.pool.ntp.org
149
150# South America
151server 2.south-america.pool.ntp.org
152
153driftfile /var/cache/ntp.drift</literal>
154pidfile /var/run/ntpd.pid
155EOF</userinput></screen>
156
157 </sect3>
158
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>
163 continuously and allow it to synchronize the time in a gradual manner. The
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>
166
167 <para>If you choose Option one, then install the
168 <filename>/etc/rc.d/init.d/ntp</filename>
169 init script included in the
170 <xref linkend="bootscripts"/> package.</para>
171
172 <indexterm zone="ntp ntp-init">
173 <primary sortas="f-ntp">ntp</primary>
174 </indexterm>
175
176<screen role="root"><userinput>make install-ntp</userinput></screen>
177
178 <para>If you prefer to run <command>ntpd</command> periodically, add the
179 following command to <systemitem class="username">root</systemitem>'s
180 <filename>crontab</filename>:</para>
181
182<screen><literal>ntpd -q</literal></screen>
183
184 <para>Execute the following command if you would like to set the
185 hardware clock to the current system time at shutdown and reboot:</para>
186
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>
189
190 <para>The other way around is already set up by LFS.</para>
191
192 </sect3>
193
194 </sect2>
195
196 <sect2 role="content">
197 <title>Contents</title>
198
199 <segmentedlist>
200 <segtitle>Installed Programs</segtitle>
201 <segtitle>Installed Libraries</segtitle>
202 <segtitle>Installed Directory</segtitle>
203
204 <seglistitem>
205 <seg>ntp-keygen, ntp-wait, ntpd, ntpdate, ntpdc, ntpq,
206 ntptime, ntptrace, sntp and tickadj</seg>
207 <seg>None</seg>
208 <seg>/usr/share/doc/ntp-&ntp-version;</seg>
209 </seglistitem>
210 </segmentedlist>
211
212 <variablelist>
213 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
214 <?dbfo list-presentation="list"?>
215 <?dbhtml list-presentation="table"?>
216
217 <varlistentry id="ntp-keygen">
218 <term><command>ntp-keygen</command></term>
219 <listitem>
220 <para>generates cryptographic data files used by the NTPv4 authentication
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>
227
228 <varlistentry id="ntp-wait">
229 <term><command>ntp-wait</command></term>
230 <listitem>
231 <para>is useful at boot time, to delay the boot sequence until
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>
238
239 <varlistentry id="ntpd">
240 <term><command>ntpd</command></term>
241 <listitem>
242 <para>is a NTP daemon that runs in the background and keeps
243 the date and time synchronized based on response from configured
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>
250
251 <varlistentry id="ntpdate">
252 <term><command>ntpdate</command></term>
253 <listitem>
254 <para>is a client program that sets the date and time based on
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>
261
262 <varlistentry id="ntpdc">
263 <term><command>ntpdc</command></term>
264 <listitem>
265 <para>is used to query the NTP daemon about its current state
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>
272
273 <varlistentry id="ntpq">
274 <term><command>ntpq</command></term>
275 <listitem>
276 <para>is an utility program used to monitor <command>ntpd</command>
277 operations and determine performance.</para>
278 <indexterm zone="ntp ntpq">
279 <primary sortas="b-ntpq">ntpq</primary>
280 </indexterm>
281 </listitem>
282 </varlistentry>
283
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>
293
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">
299 <primary sortas="b-ntptrace">ntptrace</primary>
300 </indexterm>
301 </listitem>
302 </varlistentry>
303
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
314 <varlistentry id="tickadj">
315 <term><command>tickadj</command></term>
316 <listitem>
317 <para>reads, and optionally modifies, several timekeeping-related
318 variables in older kernels that do not have support for precision
319 timekeeping.</para>
320 <indexterm zone="ntp tickadj">
321 <primary sortas="b-tickadj">tickadj</primary>
322 </indexterm>
323 </listitem>
324 </varlistentry>
325
326 </variablelist>
327
328 </sect2>
329
330</sect1>
Note: See TracBrowser for help on using the repository browser.