source: networking/netprogs/ntp.xml@ 0d8e1ed7

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 0d8e1ed7 was 0d8e1ed7, checked in by Igor Živković <igor@…>, 11 years ago

ntp: moved libcap2 to optional dependencies

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

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