10.0
10.1
11.0
11.1
11.2
11.3
12.0
12.1
12.2
6.0
6.1
6.2
6.2.0
6.2.0-rc1
6.2.0-rc2
6.3
6.3-rc1
6.3-rc2
6.3-rc3
7.10
7.4
7.5
7.6
7.6-blfs
7.6-systemd
7.7
7.8
7.9
8.0
8.1
8.2
8.3
8.4
9.0
9.1
basic
bdubbs/svn
elogind
gimp3
gnome
kde5-13430
kde5-14269
kde5-14686
kea
ken/TL2024
ken/inkscape-core-mods
ken/tuningfonts
krejzi/svn
lazarus
lxqt
nosym
perl-modules
plabs/newcss
plabs/python-mods
python3.11
qt5new
rahul/power-profiles-daemon
renodr/vulkan-addition
systemd-11177
systemd-13485
trunk
upgradedb
v5_0
v5_0-pre1
v5_1
v5_1-pre1
xry111/for-12.3
xry111/intltool
xry111/llvm18
xry111/soup3
xry111/spidermonkey128
xry111/test-20220226
xry111/xf86-video-removal
Last change
on this file since a4be499 was 9491ec6b, checked in by Larry Lawrence <larry@…>, 21 years ago |
spelling
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1276 af4574ff-66df-0310-9fd7-8a98e5e911e0
|
-
Property mode
set to
100644
|
File size:
2.1 KB
|
Line | |
---|
1 | <sect2>
|
---|
2 | <title>Configuring <application>NTP</application></title>
|
---|
3 |
|
---|
4 | <sect3><title>Config files</title>
|
---|
5 | <para><filename>/etc/ntp.conf</filename></para>
|
---|
6 | </sect3>
|
---|
7 |
|
---|
8 | <sect3><title>Configuration Information</title>
|
---|
9 |
|
---|
10 | <para>The following configuration file defines various <acronym>NTP</acronym>
|
---|
11 | servers to use with the primary server designated with the prefer tag. It also
|
---|
12 | creates a drift file where <command>ntpd</command> stores the frequency
|
---|
13 | offset. Since the documentation included with the package is sparse, visit the NTP website at
|
---|
14 | <ulink url="http://www.ntp.org/"/> for more information.</para>
|
---|
15 |
|
---|
16 | <screen><userinput>server time-a.nist.gov prefer
|
---|
17 | server time-b.nist.gov
|
---|
18 | server tick.usno.navy.mil
|
---|
19 | driftfile /var/cache/ntp.drift</userinput></screen>
|
---|
20 | </sect3>
|
---|
21 |
|
---|
22 | <sect3><title>Synchronizing the time</title>
|
---|
23 |
|
---|
24 | <para>There are two options. Option one is to use run <command>ntpd</command>
|
---|
25 | continuously and allow it to synchronize the time in a gradual manner. The other
|
---|
26 | option is to run <command>ntpd</command> periodically (using cron)
|
---|
27 | and update the time each time <command>ntpd</command> is scheduled.</para>
|
---|
28 |
|
---|
29 | <para>If you choose Option one, then create the bootscript
|
---|
30 | <filename>/etc/rc.d/init.d/ntp</filename> and put the start and
|
---|
31 | stop symlinks:</para>
|
---|
32 | <screen><userinput>#!/bin/bash
|
---|
33 | # Begin $rc_base/init.d/ntp
|
---|
34 | source /etc/sysconfig/rc
|
---|
35 | source $rc_functions
|
---|
36 | case "$1" in
|
---|
37 | start)
|
---|
38 | echo "Starting ntpd..."
|
---|
39 | loadproc ntpd
|
---|
40 | ;;
|
---|
41 | stop)
|
---|
42 | echo "Stopping ntpd..."
|
---|
43 | killproc ntpd
|
---|
44 | ;;
|
---|
45 | restart)
|
---|
46 | $0 stop
|
---|
47 | sleep 1
|
---|
48 | $0 start
|
---|
49 | ;;
|
---|
50 | status)
|
---|
51 | statusproc ntpd
|
---|
52 | ;;
|
---|
53 | *)
|
---|
54 | echo "Usage: $0 {start|stop|restart|status}"
|
---|
55 | exit 1
|
---|
56 | ;;
|
---|
57 | esac
|
---|
58 | # End $rc_base/init.d/ntp</userinput></screen>
|
---|
59 |
|
---|
60 | <para>If you prefer to start ntpd periodically, add the following command to
|
---|
61 | the root's <filename>crontab</filename>:</para>
|
---|
62 | <screen><userinput>ntpd -q</userinput></screen>
|
---|
63 |
|
---|
64 | </sect3>
|
---|
65 |
|
---|
66 | </sect2>
|
---|
67 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.