Configuring NTP
Config files
/etc/ntp.conf
Configuration Information
The following configuration file defines various NTP
stratum 2 servers with open access from different continents. It also
creates a drift file where ntpd stores the frequency
offset. Since the documentation included with the package is sparse,
visit the NTP website at
for more information.
cat > /etc/ntp.conf << "EOF"
# Africa
server tock.nml.csir.co.za
# Asia
server ntp.shim.org
# Australia
server ntp.saard.net
# Europe
server ntp.tuxfamily.net
# North America
server clock.psu.edu
driftfile /var/cache/ntp.drift
EOF
Synchronizing the time
There are two options. Option one is to use run ntpd
continuously and allow it to synchronize the time in a gradual manner. The other
option is to run ntpd periodically (using cron)
and update the time each time ntpd is scheduled.
If you choose Option one, then install
/etc/rc.d/init.d/ntp
init script included in the
package.
make install-ntp
If you prefer to start ntpd periodically, add the following command to
the root's crontab:
ntpd -q