source: networking/netprogs/ntp.xml@ c67fbf64

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

Remove packages that are now in lfs systemd from blfs.

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