source: networking/netprogs/ntp.xml@ 491dcb99

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 491dcb99 was 491dcb99, checked in by Igor Živković <igor@…>, 11 years ago

consistency

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

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