source: networking/netprogs/ntp.xml@ 78b797d

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 78b797d was 78b797d, checked in by Fernando de Oliveira <fernando@…>, 9 years ago

inkscape-0.48.5: use sed by Armin to replace sed by Fernando based on patch by Armin, used to replace patch by Armin.
mplayer-2014-12-19: use semi-colon to separate the 'Optional Miscellaneous Dependencies' and clarify.
Update to ntp-4.2.8.
Update to libvdpau-0.9.
Update to libxklavier-5.4.
Update to libreoffice-4.3.5.2.

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

  • Property mode set to 100644
File size: 12.3 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 "&gentoo-ftp-repo;/ntp-&ntp-version;.tar.gz">
9 <!ENTITY ntp-md5sum "6972a626be6150db8cfbd0b63d8719e7">
10 <!ENTITY ntp-size "6.5 MB">
11 <!ENTITY ntp-buildsize "59 MB">
12 <!ENTITY ntp-time "0.7 SBU">
13]>
14
15<sect1 id="ntp" xreflabel="ntp-&ntp-version;">
16 <?dbhtml filename="ntp.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>ntp-&ntp-version;</title>
24
25 <indexterm zone="ntp">
26 <primary sortas="a-ntp">ntp</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to ntp</title>
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
35 NTP protocol.</para>
36
37 &lfs76_checked;
38
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>
57 <para>Estimated build time: &ntp-time;</para>
58 </listitem>
59 </itemizedlist>
60
61 <bridgehead renderas="sect3">ntp Dependencies</bridgehead>
62
63 <bridgehead renderas="sect4">Optional</bridgehead>
64 <para role="optional">
65 <xref linkend="libcap-pam"/>,
66 <xref linkend="openssl"/>, and
67 <ulink url="http://www.thrysoee.dk/editline/">libedit</ulink>
68 </para>
69
70 <para condition="html" role="usernotes">User Notes:
71 <ulink url="&blfs-wiki;/ntp"/></para>
72
73 </sect2>
74
75 <sect2 role="installation">
76 <title>Installation of ntp</title>
77
78 <para>
79 There should be a dedicated user and group to take control
80 of the <command>ntpd</command> daemon after it is
81 started. Issue the following commands as the
82 <systemitem class="username">root</systemitem> user:
83 </para>
84
85<screen role="root"><userinput>groupadd -g 87 ntp &amp;&amp;
86useradd -c "Network Time Protocol" -d /var/lib/ntp -u 87 \
87 -g ntp -s /bin/false ntp</userinput></screen>
88
89 <para>Install <application>ntp</application> by running
90 the following commands:</para>
91
92<screen><userinput>./configure --prefix=/usr \
93 --bindir=/usr/sbin \
94 --sysconfdir=/etc \
95 --enable-linuxcaps \
96 --with-lineeditlibs=readline \
97 --docdir=/usr/share/doc/ntp-&ntp-version; &amp;&amp;
98make</userinput></screen>
99
100 <para>To test the results, issue: <command>make check</command>.</para>
101
102 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
103
104<screen role="root"><userinput>make install &amp;&amp;
105install -v -o ntp -g ntp -d /var/lib/ntp</userinput></screen>
106
107 </sect2>
108
109 <sect2 role="commands">
110 <title>Command Explanations</title>
111
112 <para><parameter>--bindir=/usr/sbin</parameter>: This parameter places
113 the administrative programs in <filename
114 class="directory">/usr/sbin</filename>.</para>
115
116 <para><parameter>--enable-linuxcaps</parameter>: ntpd is run as user
117 ntp, so use Linux capabilities for non-root clock control.</para>
118
119 <para><option>--with-lineeditlibs=readline</option>: This option enables
120 <application>Readline</application> support for <command>ntpdc</command>
121 and <command>ntpq</command> programs. If omitted,
122 <application>libedit</application> will be used if installed, otherwise no
123 readline capabilites will be compiled.</para>
124
125 </sect2>
126
127 <sect2 role="configuration">
128 <title>Configuring ntp</title>
129
130 <sect3 id="ntp-config">
131 <title>Config Files</title>
132
133 <para><filename>/etc/ntp.conf</filename></para>
134
135 <indexterm zone="ntp ntp-config">
136 <primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
137 </indexterm>
138
139 </sect3>
140
141 <sect3>
142 <title>Configuration Information</title>
143
144 <para>The following configuration file defines various ntp servers
145 with open access from different continents. It also creates a
146 drift file where <command>ntpd</command> stores the frequency
147 offset and a pid file to store the <command>ntpd</command> process
148 ID. Since the documentation included with the package is sparse,
149 visit the ntp website at <ulink url="http://www.ntp.org/"/> and
150 <ulink url="http://www.pool.ntp.org/"/> for more information.</para>
151
152<screen role="root"><userinput>cat &gt; /etc/ntp.conf &lt;&lt; "EOF"
153<literal># Asia
154server 0.asia.pool.ntp.org
155
156# Australia
157server 0.oceania.pool.ntp.org
158
159# Europe
160server 0.europe.pool.ntp.org
161
162# North America
163server 0.north-america.pool.ntp.org
164
165# South America
166server 2.south-america.pool.ntp.org
167
168driftfile /var/lib/ntp/ntp.drift
169pidfile /var/run/ntpd.pid</literal>
170EOF</userinput></screen>
171
172 <para>For security reasons, you may wish to add some more lines,
173 accordingto e.g. <quote>Access Control Commands and Options</quote>, at
174 <ulink
175 url="http://www.eecis.udel.edu/~mills/ntp/html/accopt.html#restrict"/>.</para>
176
177<screen role="root"><userinput>cat &gt;&gt; /etc/ntp.conf &lt;&lt; "EOF"
178<literal># Security session
179restrict default limited kod nomodify notrap nopeer noquery
180restrict -6 default limited kod nomodify notrap nopeer noquery
181
182restrict 127.0.0.1
183restrict ::1</literal>
184EOF</userinput></screen>
185
186 </sect3>
187
188 <sect3 id="ntp-init">
189 <title>Synchronizing the Time</title>
190
191 <para>There are two options. Option one is to run <command>ntpd</command>
192 continuously and allow it to synchronize the time in a gradual manner. The
193 other option is to run <command>ntpd</command> periodically (using cron)
194 and update the time each time <command>ntpd</command> is scheduled.</para>
195
196 <para>If you choose Option one, then install the
197 <filename>/etc/rc.d/init.d/ntp</filename>
198 init script included in the
199 <xref linkend="bootscripts"/> package.</para>
200
201 <indexterm zone="ntp ntp-init">
202 <primary sortas="f-ntp">ntp</primary>
203 </indexterm>
204
205<screen role="root"><userinput>make install-ntpd</userinput></screen>
206
207 <para>If you prefer to run <command>ntpd</command> periodically, add the
208 following command to <systemitem class="username">root</systemitem>'s
209 <filename>crontab</filename>:</para>
210
211<screen><literal>ntpd -q</literal></screen>
212
213 <para>Execute the following command if you would like to set the
214 hardware clock to the current system time at shutdown and reboot:</para>
215
216<screen role="root"><userinput>ln -v -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &amp;&amp;
217ln -v -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock</userinput></screen>
218
219 <para>The other way around is already set up by LFS.</para>
220
221 </sect3>
222
223 </sect2>
224
225 <sect2 role="content">
226 <title>Contents</title>
227
228 <segmentedlist>
229 <segtitle>Installed Programs</segtitle>
230 <segtitle>Installed Libraries</segtitle>
231 <segtitle>Installed Directories</segtitle>
232
233 <seglistitem>
234 <seg>calc_tickadj, ntp-keygen, ntp-wait, ntpd, ntpdate, ntpdc, ntpq,
235 ntptime, ntptrace, sntp and tickadj</seg>
236 <seg>None</seg>
237 <seg>/usr/share/ntp,
238 /usr/share/doc/ntp-4.2.8 and
239 /var/lib/ntp</seg>
240 </seglistitem>
241 </segmentedlist>
242
243 <variablelist>
244 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
245 <?dbfo list-presentation="list"?>
246 <?dbhtml list-presentation="table"?>
247
248 <varlistentry id="calc_tickadj">
249 <term><command>calc_tickadj</command></term>
250 <listitem>
251 <para>calculates optimal value for tick given ntp drift file.</para>
252 <indexterm zone="ntp calc_tickadj">
253 <primary sortas="b-calc_tickadj">calc_tickadj</primary>
254 </indexterm>
255 </listitem>
256 </varlistentry>
257
258 <varlistentry id="ntp-keygen">
259 <term><command>ntp-keygen</command></term>
260 <listitem>
261 <para>generates cryptographic data files used by the NTPv4 authentication
262 and identification schemes.</para>
263 <indexterm zone="ntp ntp-keygen">
264 <primary sortas="b-ntp-keygen">ntp-keygen</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry id="ntp-wait">
270 <term><command>ntp-wait</command></term>
271 <listitem>
272 <para>is useful at boot time, to delay the boot sequence until
273 <command>ntpd</command> has set the time.</para>
274 <indexterm zone="ntp ntp-wait">
275 <primary sortas="b-ntp-wait">ntp-wait</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
280 <varlistentry id="ntpd">
281 <term><command>ntpd</command></term>
282 <listitem>
283 <para>is a ntp daemon that runs in the background and keeps
284 the date and time synchronized based on response from configured
285 ntp servers. It also functions as a ntp server.</para>
286 <indexterm zone="ntp ntpd">
287 <primary sortas="b-ntpd">ntpd</primary>
288 </indexterm>
289 </listitem>
290 </varlistentry>
291
292 <varlistentry id="ntpdate">
293 <term><command>ntpdate</command></term>
294 <listitem>
295 <para>is a client program that sets the date and time based on
296 the response from an ntp server. This command is deprecated.</para>
297 <indexterm zone="ntp ntpdate">
298 <primary sortas="b-ntpdate">ntpdate</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry id="ntpdc">
304 <term><command>ntpdc</command></term>
305 <listitem>
306 <para>is used to query the ntp daemon about its current state
307 and to request changes in that state.</para>
308 <indexterm zone="ntp ntpdc">
309 <primary sortas="b-ntpdc">ntpdc</primary>
310 </indexterm>
311 </listitem>
312 </varlistentry>
313
314 <varlistentry id="ntpq">
315 <term><command>ntpq</command></term>
316 <listitem>
317 <para>is an utility program used to monitor <command>ntpd</command>
318 operations and determine performance.</para>
319 <indexterm zone="ntp ntpq">
320 <primary sortas="b-ntpq">ntpq</primary>
321 </indexterm>
322 </listitem>
323 </varlistentry>
324
325 <varlistentry id="ntptime">
326 <term><command>ntptime</command></term>
327 <listitem>
328 <para>reads and displays time-related kernel variables.</para>
329 <indexterm zone="ntp ntptime">
330 <primary sortas="b-ntptime">ntptime</primary>
331 </indexterm>
332 </listitem>
333 </varlistentry>
334
335 <varlistentry id="ntptrace">
336 <term><command>ntptrace</command></term>
337 <listitem>
338 <para>traces a chain of ntp servers back to the primary source.</para>
339 <indexterm zone="ntp ntptrace">
340 <primary sortas="b-ntptrace">ntptrace</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
344
345 <varlistentry id="sntp">
346 <term><command>sntp</command></term>
347 <listitem>
348 <para>is a Simple Network Time Protocol (SNTP) client.</para>
349 <indexterm zone="ntp sntp">
350 <primary sortas="b-sntp">sntp</primary>
351 </indexterm>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry id="tickadj">
356 <term><command>tickadj</command></term>
357 <listitem>
358 <para>reads, and optionally modifies, several timekeeping-related
359 variables in older kernels that do not have support for precision
360 timekeeping.</para>
361 <indexterm zone="ntp tickadj">
362 <primary sortas="b-tickadj">tickadj</primary>
363 </indexterm>
364 </listitem>
365 </varlistentry>
366
367 </variablelist>
368
369 </sect2>
370
371</sect1>
Note: See TracBrowser for help on using the repository browser.