source: networking/netprogs/ntp.xml@ 13e0a61

systemd-11177
Last change on this file since 13e0a61 was 13e0a61, checked in by Krejzi <krejzi@…>, 11 years ago

Merge trunk and systemd branch

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@11231 af4574ff-66df-0310-9fd7-8a98e5e911e0

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