source: networking/netprogs/ntp.xml@ 4270d9a

gnome
Last change on this file since 4270d9a was c463c87, checked in by Christopher Gregory <cjg@…>, 10 years ago

Removed excess white space and updated systemd instructions on svnserver autofs bluez fcron sysstat nfs-utils ntp rsync samba wpa_supplicant
avahi mariadb postgresql exim postfix apache bind proftpd vsftpd openldap unbound xinetd and clutter pages

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

  • Property mode set to 100644
File size: 11.7 KB
RevLine 
[d47e7ea9]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[d47e7ea9]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[36474cb]7 <!ENTITY ntp-download-http "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-&ntp-version;.tar.gz">
[6564aa1]8 <!ENTITY ntp-download-ftp "&gentoo-ftp-repo;/ntp-&ntp-version;.tar.gz">
[10516957]9 <!ENTITY ntp-md5sum "00df80a84ec9528fcfb09498075525bc">
10 <!ENTITY ntp-size "4.1 MB">
11 <!ENTITY ntp-buildsize "48 MB">
[6564aa1]12 <!ENTITY ntp-time "0.5 SBU">
[d47e7ea9]13]>
14
[286c613d]15<sect1 id="ntp" xreflabel="ntp-&ntp-version;">
[dc6715a]16 <?dbhtml filename="ntp.html"?>
[56ab82c]17
[dc6715a]18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
[56ab82c]22
[286c613d]23 <title>ntp-&ntp-version;</title>
[56ab82c]24
[dc6715a]25 <indexterm zone="ntp">
[286c613d]26 <primary sortas="a-ntp">ntp</primary>
[dc6715a]27 </indexterm>
28
29 <sect2 role="package">
[286c613d]30 <title>Introduction to ntp</title>
[56ab82c]31
[286c613d]32 <para>The <application>ntp</application> package contains a
[56ab82c]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
[dc6715a]35 NTP protocol.</para>
[56ab82c]36
[41b674d]37 &lfs75_checked;
[6564aa1]38
[dc6715a]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>
[2174baa]57 <para>Estimated build time: &ntp-time;</para>
58 </listitem>
[dc6715a]59 </itemizedlist>
[56ab82c]60
[286c613d]61 <bridgehead renderas="sect3">ntp Dependencies</bridgehead>
[56ab82c]62
[dc6715a]63 <bridgehead renderas="sect4">Optional</bridgehead>
[03f32bb]64 <para role="optional">
[56605b9]65 <xref linkend="libcap-pam"/>,
66 <xref linkend="openssl"/>, and
[03f32bb]67 <ulink url="http://www.thrysoee.dk/editline/">libedit</ulink>
68 </para>
[56ab82c]69
[061ec9d]70 <para condition="html" role="usernotes">User Notes:
71 <ulink url="&blfs-wiki;/ntp"/></para>
72
[dc6715a]73 </sect2>
[56ab82c]74
[dc6715a]75 <sect2 role="installation">
[286c613d]76 <title>Installation of ntp</title>
[dc6715a]77
[e38cfca]78 <para>
79 There should be a dedicated user and group to take control
80 of the <command>ntpd</command> daemon after it is
81 started. Issue the following commands as the
82 <systemitem class="username">root</systemitem> user:
83 </para>
84
85<screen role="root"><userinput>groupadd -g 87 ntp &amp;&amp;
86useradd -c "Network Time Protocol" -d /var/lib/ntp -u 87 \
87 -g ntp -s /bin/false ntp</userinput></screen>
88
[286c613d]89 <para>Install <application>ntp</application> by running
[dc6715a]90 the following commands:</para>
91
[f82ac3f]92<screen><userinput>./configure --prefix=/usr \
[2dcc08c0]93 --sysconfdir=/etc \
94 --enable-linuxcaps \
95 --with-binsubdir=sbin \
96 --with-lineeditlibs=readline &amp;&amp;
[11cf9f2]97make</userinput></screen>
98
99 <para>To test the results, issue: <command>make check</command>.</para>
[56ab82c]100
[11cf9f2]101 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
[56ab82c]102
[339fbfb9]103<screen role="root"><userinput>make install &amp;&amp;
[491dcb99]104install -v -o ntp -g ntp -d /var/lib/ntp &amp;&amp;
[339fbfb9]105install -v -m755 -d /usr/share/doc/ntp-&ntp-version; &amp;&amp;
[36474cb]106cp -v -R html/* /usr/share/doc/ntp-&ntp-version;/</userinput></screen>
107
108 </sect2>
109
110 <sect2 role="commands">
111 <title>Command Explanations</title>
112
113 <para><parameter>--with-binsubdir=sbin</parameter>: This parameter places
114 the administrative programs in <filename
115 class="directory">/usr/sbin</filename>.</para>
[11cf9f2]116
[2dcc08c0]117 <para><parameter>--enable-linuxcaps</parameter>: ntpd is run as user
118 ntp, so use Linux capabilities for non-root clock control.</para>
119
[a01b1bf]120 <para><option>--with-lineeditlibs=readline</option>: This option enables
121 <application>Readline</application> support for <command>ntpdc</command>
122 and <command>ntpq</command> programs. If omitted,
123 <application>libedit</application> will be used if installed, otherwise no
124 readline capabilites will be compiled.</para>
125
[dc6715a]126 </sect2>
[56ab82c]127
[dc6715a]128 <sect2 role="configuration">
[286c613d]129 <title>Configuring ntp</title>
[56ab82c]130
[dc6715a]131 <sect3 id="ntp-config">
132 <title>Config Files</title>
[56ab82c]133
[dc6715a]134 <para><filename>/etc/ntp.conf</filename></para>
[56ab82c]135
[dc6715a]136 <indexterm zone="ntp ntp-config">
137 <primary sortas="e-etc-ntp.conf">/etc/ntp.conf</primary>
138 </indexterm>
[56ab82c]139
[dc6715a]140 </sect3>
[56ab82c]141
[dc6715a]142 <sect3>
143 <title>Configuration Information</title>
144
[286c613d]145 <para>The following configuration file defines various ntp servers
[a88b03e]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,
[286c613d]150 visit the ntp website at <ulink url="http://www.ntp.org/"/> and
[a88b03e]151 <ulink url="http://www.pool.ntp.org/"/> for more information.</para>
[dc6715a]152
153<screen role="root"><userinput>cat &gt; /etc/ntp.conf &lt;&lt; "EOF"
[6e26273]154<literal># Asia
[bca6dfb6]155server 0.asia.pool.ntp.org
[d47e7ea9]156
157# Australia
[bca6dfb6]158server 0.oceania.pool.ntp.org
[56ab82c]159
[d47e7ea9]160# Europe
[ea57941f]161server 0.europe.pool.ntp.org
[d47e7ea9]162
163# North America
[ea57941f]164server 0.north-america.pool.ntp.org
165
166# South America
[bca6dfb6]167server 2.south-america.pool.ntp.org
[d47e7ea9]168
[1e72251e]169driftfile /var/lib/ntp/ntp.drift
[a5d7e29]170pidfile /var/run/ntpd.pid</literal>
[dc6715a]171EOF</userinput></screen>
172
173 </sect3>
[56ab82c]174
[5bc57bb]175 <sect3 id="ntp-init-systemd">
[dc6715a]176 <title>Synchronizing the Time</title>
177
178 <para>There are two options. Option one is to run <command>ntpd</command>
[56ab82c]179 continuously and allow it to synchronize the time in a gradual manner. The
[dc6715a]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>
[56ab82c]182
183 <para>If you choose Option one, then install the
[5bc57bb]184 native systemd unit included in the
185 <xref linkend="systemd-units"/> package as the <systemitem class="username">root</systemitem>
186 user:</para>
[56ab82c]187
[5bc57bb]188 <indexterm zone="ntp ntp-init-systemd">
[dc6715a]189 <primary sortas="f-ntp">ntp</primary>
[56ab82c]190 </indexterm>
[dc6715a]191
[286c613d]192<screen role="root"><userinput>make install-ntpd</userinput></screen>
[dc6715a]193
[c463c87]194 <para>As the <systemitem class="username">root</systemitem> user,
195 use the new systemd unit to start <command>ntpd</command>:</para>
196
197<screen role="root"><userinput>systemctl start ntpd.service</userinput></screen>
198
[56ab82c]199 <para>If you prefer to run <command>ntpd</command> periodically, add the
200 following command to <systemitem class="username">root</systemitem>'s
[dc6715a]201 <filename>crontab</filename>:</para>
[56ab82c]202
[dc6715a]203<screen><literal>ntpd -q</literal></screen>
204
205 <para>Execute the following command if you would like to set the
[339fbfb9]206 hardware clock to the current system time at shutdown and reboot:</para>
[dc6715a]207
[e3353b3]208<screen role="root"><userinput>ln -v -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &amp;&amp;
209ln -v -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock</userinput></screen>
[dc6715a]210
211 <para>The other way around is already set up by LFS.</para>
[56ab82c]212
[dc6715a]213 </sect3>
[56ab82c]214
[dc6715a]215 </sect2>
[56ab82c]216
[dc6715a]217 <sect2 role="content">
218 <title>Contents</title>
[56ab82c]219
[dc6715a]220 <segmentedlist>
221 <segtitle>Installed Programs</segtitle>
222 <segtitle>Installed Libraries</segtitle>
[22292f3a]223 <segtitle>Installed Directory</segtitle>
[56ab82c]224
[dc6715a]225 <seglistitem>
[56ab82c]226 <seg>ntp-keygen, ntp-wait, ntpd, ntpdate, ntpdc, ntpq,
[36474cb]227 ntptime, ntptrace, sntp and tickadj</seg>
[dc6715a]228 <seg>None</seg>
[22292f3a]229 <seg>/usr/share/doc/ntp-&ntp-version;</seg>
[dc6715a]230 </seglistitem>
231 </segmentedlist>
[56ab82c]232
[dc6715a]233 <variablelist>
234 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
235 <?dbfo list-presentation="list"?>
236 <?dbhtml list-presentation="table"?>
[56ab82c]237
[dc6715a]238 <varlistentry id="ntp-keygen">
239 <term><command>ntp-keygen</command></term>
240 <listitem>
[56ab82c]241 <para>generates cryptographic data files used by the NTPv4 authentication
[dc6715a]242 and identification schemes.</para>
243 <indexterm zone="ntp ntp-keygen">
244 <primary sortas="b-ntp-keygen">ntp-keygen</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
[56ab82c]248
[dc6715a]249 <varlistentry id="ntp-wait">
250 <term><command>ntp-wait</command></term>
251 <listitem>
[56ab82c]252 <para>is useful at boot time, to delay the boot sequence until
[dc6715a]253 <command>ntpd</command> has set the time.</para>
254 <indexterm zone="ntp ntp-wait">
255 <primary sortas="b-ntp-wait">ntp-wait</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
[56ab82c]259
[dc6715a]260 <varlistentry id="ntpd">
261 <term><command>ntpd</command></term>
262 <listitem>
[286c613d]263 <para>is a ntp daemon that runs in the background and keeps
[56ab82c]264 the date and time synchronized based on response from configured
[286c613d]265 ntp servers. It also functions as a ntp server.</para>
[dc6715a]266 <indexterm zone="ntp ntpd">
267 <primary sortas="b-ntpd">ntpd</primary>
268 </indexterm>
269 </listitem>
270 </varlistentry>
[56ab82c]271
[dc6715a]272 <varlistentry id="ntpdate">
273 <term><command>ntpdate</command></term>
274 <listitem>
[56ab82c]275 <para>is a client program that sets the date and time based on
[286c613d]276 the response from an ntp server. This command is deprecated.</para>
[dc6715a]277 <indexterm zone="ntp ntpdate">
278 <primary sortas="b-ntpdate">ntpdate</primary>
279 </indexterm>
280 </listitem>
281 </varlistentry>
[56ab82c]282
[dc6715a]283 <varlistentry id="ntpdc">
284 <term><command>ntpdc</command></term>
285 <listitem>
[286c613d]286 <para>is used to query the ntp daemon about its current state
[dc6715a]287 and to request changes in that state.</para>
288 <indexterm zone="ntp ntpdc">
289 <primary sortas="b-ntpdc">ntpdc</primary>
290 </indexterm>
291 </listitem>
292 </varlistentry>
[56ab82c]293
[dc6715a]294 <varlistentry id="ntpq">
295 <term><command>ntpq</command></term>
296 <listitem>
[56ab82c]297 <para>is an utility program used to monitor <command>ntpd</command>
[dc6715a]298 operations and determine performance.</para>
299 <indexterm zone="ntp ntpq">
300 <primary sortas="b-ntpq">ntpq</primary>
301 </indexterm>
302 </listitem>
303 </varlistentry>
[56ab82c]304
[dc6715a]305 <varlistentry id="ntptime">
306 <term><command>ntptime</command></term>
307 <listitem>
308 <para>reads and displays time-related kernel variables.</para>
309 <indexterm zone="ntp ntptime">
310 <primary sortas="b-ntptime">ntptime</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
[56ab82c]314
[dc6715a]315 <varlistentry id="ntptrace">
316 <term><command>ntptrace</command></term>
317 <listitem>
[286c613d]318 <para>traces a chain of ntp servers back to the primary source.</para>
[dc6715a]319 <indexterm zone="ntp ntptrace">
[56ab82c]320 <primary sortas="b-ntptrace">ntptrace</primary>
[dc6715a]321 </indexterm>
322 </listitem>
323 </varlistentry>
[56ab82c]324
[36474cb]325 <varlistentry id="sntp">
326 <term><command>sntp</command></term>
327 <listitem>
328 <para>is a Simple Network Time Protocol (SNTP) client.</para>
329 <indexterm zone="ntp sntp">
330 <primary sortas="b-sntp">sntp</primary>
331 </indexterm>
332 </listitem>
333 </varlistentry>
334
[dc6715a]335 <varlistentry id="tickadj">
336 <term><command>tickadj</command></term>
337 <listitem>
[56ab82c]338 <para>reads, and optionally modifies, several timekeeping-related
339 variables in older kernels that do not have support for precision
[dc6715a]340 timekeeping.</para>
341 <indexterm zone="ntp tickadj">
342 <primary sortas="b-tickadj">tickadj</primary>
343 </indexterm>
344 </listitem>
345 </varlistentry>
[56ab82c]346
[dc6715a]347 </variablelist>
[56ab82c]348
[dc6715a]349 </sect2>
[56ab82c]350
[39f01ca]351</sect1>
Note: See TracBrowser for help on using the repository browser.