source: networking/netprogs/ntp-systemd.xml@ 61849670

7.6-blfs 7.6-systemd kde5-14269 kde5-14686 systemd-13485
Last change on this file since 61849670 was 61849670, checked in by Krejzi <krejzi@…>, 10 years ago

Remove references to libcap-pam from packages as nothing needs the pam module. libcap is in LFS.

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

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