1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.4/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-stable-&ntp-version;-20060224.tar.gz">
|
---|
8 | <!ENTITY ntp-download-ftp "ftp://ftp.udel.edu/pub/ntp/ntp4/ntp-stable-&ntp-version;-20060224.tar.gz">
|
---|
9 | <!ENTITY ntp-md5sum "49d4a704b49dc1ef2a7ec0b7938c3ae1">
|
---|
10 | <!ENTITY ntp-size "2.3 MB">
|
---|
11 | <!ENTITY ntp-buildsize "22.1 MB">
|
---|
12 | <!ENTITY ntp-time "0.4 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 | <keywordset>
|
---|
22 | <keyword role="package">ntp-&ntp-version;.tar</keyword>
|
---|
23 | <keyword role="ftpdir">ntp</keyword>
|
---|
24 | </keywordset>
|
---|
25 | </sect1info>
|
---|
26 |
|
---|
27 | <title>NTP-&ntp-version;</title>
|
---|
28 |
|
---|
29 | <indexterm zone="ntp">
|
---|
30 | <primary sortas="a-NTP">NTP</primary>
|
---|
31 | </indexterm>
|
---|
32 |
|
---|
33 | <sect2 role="package">
|
---|
34 | <title>Introduction to NTP</title>
|
---|
35 |
|
---|
36 | <para>The <application>NTP</application> package contains a
|
---|
37 | client and server to keep the time synchronized between various computers over
|
---|
38 | a network. This package is the official reference implementation of the
|
---|
39 | NTP protocol.</para>
|
---|
40 |
|
---|
41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
42 | <itemizedlist spacing="compact">
|
---|
43 | <listitem>
|
---|
44 | <para>Download (HTTP): <ulink url="&ntp-download-http;"/></para>
|
---|
45 | </listitem>
|
---|
46 | <listitem>
|
---|
47 | <para>Download (FTP): <ulink url="&ntp-download-ftp;"/></para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>Download MD5 sum: &ntp-md5sum;</para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>Download size: &ntp-size;</para>
|
---|
54 | </listitem>
|
---|
55 | <listitem>
|
---|
56 | <para>Estimated disk space required: &ntp-buildsize;</para>
|
---|
57 | </listitem>
|
---|
58 | <listitem>
|
---|
59 | <para>Estimated build time: &ntp-time;</para>
|
---|
60 | </listitem>
|
---|
61 | </itemizedlist>
|
---|
62 |
|
---|
63 | <!--
|
---|
64 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
65 | <itemizedlist spacing='compact'>
|
---|
66 | <listitem>
|
---|
67 | <para>Required patch: <ulink
|
---|
68 | url="&patch-root;/ntp-&ntp-version;-gcc4-1.patch"/></para>
|
---|
69 | </listitem>
|
---|
70 | </itemizedlist>
|
---|
71 | -->
|
---|
72 |
|
---|
73 | <bridgehead renderas="sect3">NTP Dependencies</bridgehead>
|
---|
74 |
|
---|
75 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
76 | <para role="optional"><xref linkend="openssl"/></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>Install <application>NTP</application> by running
|
---|
87 | the following commands:</para>
|
---|
88 |
|
---|
89 | <screen><userinput>./configure --prefix=/usr --bindir=/usr/sbin \
|
---|
90 | --sysconfdir=/etc &&
|
---|
91 | make</userinput></screen>
|
---|
92 |
|
---|
93 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
94 |
|
---|
95 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
96 |
|
---|
97 | <screen role="root"><userinput>make install &&
|
---|
98 | install -v -m755 -d /usr/share/doc/ntp-&ntp-version; &&
|
---|
99 | cp -v -R html /usr/share/doc/ntp-&ntp-version;/</userinput></screen>
|
---|
100 |
|
---|
101 | </sect2>
|
---|
102 |
|
---|
103 | <sect2 role="configuration">
|
---|
104 | <title>Configuring NTP</title>
|
---|
105 |
|
---|
106 | <sect3 id="ntp-config">
|
---|
107 | <title>Config Files</title>
|
---|
108 |
|
---|
109 | <para><filename>/etc/ntp.conf</filename></para>
|
---|
110 |
|
---|
111 | <indexterm zone="ntp ntp-config">
|
---|
112 | <primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
|
---|
113 | </indexterm>
|
---|
114 |
|
---|
115 | </sect3>
|
---|
116 |
|
---|
117 | <sect3>
|
---|
118 | <title>Configuration Information</title>
|
---|
119 |
|
---|
120 | <para>The following configuration file defines various NTP servers with
|
---|
121 | open access from different continents. It also creates a drift file where
|
---|
122 | <command>ntpd</command> stores the frequency offset. Since the
|
---|
123 | documentation included with the package is sparse, visit the NTP website
|
---|
124 | at <ulink url="http://www.ntp.org/"/> and <ulink
|
---|
125 | url="http://www.pool.ntp.org/"/> for more information.</para>
|
---|
126 |
|
---|
127 | <screen role="root"><userinput>cat > /etc/ntp.conf << "EOF"
|
---|
128 | <literal># Africa
|
---|
129 | server tock.nml.csir.co.za
|
---|
130 |
|
---|
131 | # Asia
|
---|
132 | server 0.asia.pool.ntp.org
|
---|
133 |
|
---|
134 | # Australia
|
---|
135 | server 0.oceania.pool.ntp.org
|
---|
136 |
|
---|
137 | # Europe
|
---|
138 | server 0.europe.pool.ntp.org
|
---|
139 |
|
---|
140 | # North America
|
---|
141 | server 0.north-america.pool.ntp.org
|
---|
142 |
|
---|
143 | # South America
|
---|
144 | server 2.south-america.pool.ntp.org
|
---|
145 |
|
---|
146 | driftfile /var/cache/ntp.drift</literal>
|
---|
147 | EOF</userinput></screen>
|
---|
148 |
|
---|
149 | </sect3>
|
---|
150 |
|
---|
151 | <sect3 id="ntp-init">
|
---|
152 | <title>Synchronizing the Time</title>
|
---|
153 |
|
---|
154 | <para>There are two options. Option one is to run <command>ntpd</command>
|
---|
155 | continuously and allow it to synchronize the time in a gradual manner. The
|
---|
156 | other option is to run <command>ntpd</command> periodically (using cron)
|
---|
157 | and update the time each time <command>ntpd</command> is scheduled.</para>
|
---|
158 |
|
---|
159 | <para>If you choose Option one, then install the
|
---|
160 | <filename>/etc/rc.d/init.d/ntp</filename>
|
---|
161 | init script included in the
|
---|
162 | <xref linkend="bootscripts"/> package.</para>
|
---|
163 |
|
---|
164 | <indexterm zone="ntp ntp-init">
|
---|
165 | <primary sortas="f-ntp">ntp</primary>
|
---|
166 | </indexterm>
|
---|
167 |
|
---|
168 | <screen role="root"><userinput>make install-ntp</userinput></screen>
|
---|
169 |
|
---|
170 | <para>If you prefer to run <command>ntpd</command> periodically, add the
|
---|
171 | following command to <systemitem class="username">root</systemitem>'s
|
---|
172 | <filename>crontab</filename>:</para>
|
---|
173 |
|
---|
174 | <screen><literal>ntpd -q</literal></screen>
|
---|
175 |
|
---|
176 | <para>Execute the following command if you would like to set the
|
---|
177 | hardware clock to the current system time at shutdown and reboot:</para>
|
---|
178 |
|
---|
179 | <screen role="root"><userinput>ln -v -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &&
|
---|
180 | ln -v -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock</userinput></screen>
|
---|
181 |
|
---|
182 | <para>The other way around is already set up by LFS.</para>
|
---|
183 |
|
---|
184 | </sect3>
|
---|
185 |
|
---|
186 | </sect2>
|
---|
187 |
|
---|
188 | <sect2 role="content">
|
---|
189 | <title>Contents</title>
|
---|
190 |
|
---|
191 | <segmentedlist>
|
---|
192 | <segtitle>Installed Programs</segtitle>
|
---|
193 | <segtitle>Installed Libraries</segtitle>
|
---|
194 | <segtitle>Installed Directory</segtitle>
|
---|
195 |
|
---|
196 | <seglistitem>
|
---|
197 | <seg>ntp-keygen, ntp-wait, ntpd, ntpdate, ntpdc, ntpq,
|
---|
198 | ntptime, ntptrace, and tickadj</seg>
|
---|
199 | <seg>None</seg>
|
---|
200 | <seg>/usr/share/doc/ntp-&ntp-version;</seg>
|
---|
201 | </seglistitem>
|
---|
202 | </segmentedlist>
|
---|
203 |
|
---|
204 | <variablelist>
|
---|
205 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
206 | <?dbfo list-presentation="list"?>
|
---|
207 | <?dbhtml list-presentation="table"?>
|
---|
208 |
|
---|
209 | <varlistentry id="ntp-keygen">
|
---|
210 | <term><command>ntp-keygen</command></term>
|
---|
211 | <listitem>
|
---|
212 | <para>generates cryptographic data files used by the NTPv4 authentication
|
---|
213 | and identification schemes.</para>
|
---|
214 | <indexterm zone="ntp ntp-keygen">
|
---|
215 | <primary sortas="b-ntp-keygen">ntp-keygen</primary>
|
---|
216 | </indexterm>
|
---|
217 | </listitem>
|
---|
218 | </varlistentry>
|
---|
219 |
|
---|
220 | <varlistentry id="ntp-wait">
|
---|
221 | <term><command>ntp-wait</command></term>
|
---|
222 | <listitem>
|
---|
223 | <para>is useful at boot time, to delay the boot sequence until
|
---|
224 | <command>ntpd</command> has set the time.</para>
|
---|
225 | <indexterm zone="ntp ntp-wait">
|
---|
226 | <primary sortas="b-ntp-wait">ntp-wait</primary>
|
---|
227 | </indexterm>
|
---|
228 | </listitem>
|
---|
229 | </varlistentry>
|
---|
230 |
|
---|
231 | <varlistentry id="ntpd">
|
---|
232 | <term><command>ntpd</command></term>
|
---|
233 | <listitem>
|
---|
234 | <para>is a NTP daemon that runs in the background and keeps
|
---|
235 | the date and time synchronized based on response from configured
|
---|
236 | NTP servers. It also functions as a NTP server.</para>
|
---|
237 | <indexterm zone="ntp ntpd">
|
---|
238 | <primary sortas="b-ntpd">ntpd</primary>
|
---|
239 | </indexterm>
|
---|
240 | </listitem>
|
---|
241 | </varlistentry>
|
---|
242 |
|
---|
243 | <varlistentry id="ntpdate">
|
---|
244 | <term><command>ntpdate</command></term>
|
---|
245 | <listitem>
|
---|
246 | <para>is a client program that sets the date and time based on
|
---|
247 | the response from an NTP server. This command is deprecated.</para>
|
---|
248 | <indexterm zone="ntp ntpdate">
|
---|
249 | <primary sortas="b-ntpdate">ntpdate</primary>
|
---|
250 | </indexterm>
|
---|
251 | </listitem>
|
---|
252 | </varlistentry>
|
---|
253 |
|
---|
254 | <varlistentry id="ntpdc">
|
---|
255 | <term><command>ntpdc</command></term>
|
---|
256 | <listitem>
|
---|
257 | <para>is used to query the NTP daemon about its current state
|
---|
258 | and to request changes in that state.</para>
|
---|
259 | <indexterm zone="ntp ntpdc">
|
---|
260 | <primary sortas="b-ntpdc">ntpdc</primary>
|
---|
261 | </indexterm>
|
---|
262 | </listitem>
|
---|
263 | </varlistentry>
|
---|
264 |
|
---|
265 | <varlistentry id="ntpq">
|
---|
266 | <term><command>ntpq</command></term>
|
---|
267 | <listitem>
|
---|
268 | <para>is an utility program used to monitor <command>ntpd</command>
|
---|
269 | operations and determine performance.</para>
|
---|
270 | <indexterm zone="ntp ntpq">
|
---|
271 | <primary sortas="b-ntpq">ntpq</primary>
|
---|
272 | </indexterm>
|
---|
273 | </listitem>
|
---|
274 | </varlistentry>
|
---|
275 |
|
---|
276 | <varlistentry id="ntptime">
|
---|
277 | <term><command>ntptime</command></term>
|
---|
278 | <listitem>
|
---|
279 | <para>reads and displays time-related kernel variables.</para>
|
---|
280 | <indexterm zone="ntp ntptime">
|
---|
281 | <primary sortas="b-ntptime">ntptime</primary>
|
---|
282 | </indexterm>
|
---|
283 | </listitem>
|
---|
284 | </varlistentry>
|
---|
285 |
|
---|
286 | <varlistentry id="ntptrace">
|
---|
287 | <term><command>ntptrace</command></term>
|
---|
288 | <listitem>
|
---|
289 | <para>traces a chain of NTP servers back to the primary source.</para>
|
---|
290 | <indexterm zone="ntp ntptrace">
|
---|
291 | <primary sortas="b-ntptrace">ntptrace</primary>
|
---|
292 | </indexterm>
|
---|
293 | </listitem>
|
---|
294 | </varlistentry>
|
---|
295 |
|
---|
296 | <varlistentry id="tickadj">
|
---|
297 | <term><command>tickadj</command></term>
|
---|
298 | <listitem>
|
---|
299 | <para>reads, and optionally modifies, several timekeeping-related
|
---|
300 | variables in older kernels that do not have support for precision
|
---|
301 | timekeeping.</para>
|
---|
302 | <indexterm zone="ntp tickadj">
|
---|
303 | <primary sortas="b-tickadj">tickadj</primary>
|
---|
304 | </indexterm>
|
---|
305 | </listitem>
|
---|
306 | </varlistentry>
|
---|
307 |
|
---|
308 | </variablelist>
|
---|
309 |
|
---|
310 | </sect2>
|
---|
311 |
|
---|
312 | </sect1>
|
---|