time syncronization
with ntp
Syncronizing your
server or workstation with a "network time server" is easy to
do and a must when your running a server. All it requires is installing
an rpm and editing a configuration file. For a desktop machine you can
even skip editing the config file and use an intuitive GUI tool called
"dateconfig" to set up time syncronization.
files needed
ntp-x.xx.i386.rpm
how to do it
check to see if you already have ntp installed, you probably do unless
you specifically chose not to install it when you installed RedHat.
#rpm -qa | grep ntp
If you get a listing of ntp version number your good to go on to editing
your config file. If not get the rpm file from your RedHat cdroms or download
it from a RedHat mirror site.
To install it.
# rpm -ivh ntp-x.xx.i386.rpm
Now edit /etc/ntp.conf
See below example and change the time servers to match ones that are near
you. That's it unless you want to do some paranoid security concious type
of config. For that kind of tweaking go to /usr/share/doc/ntp-xxxxx and
start reading.
sample ntp.conf
file
#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
# time servers listed below. Note, these are fake addresses for example
only.
server 192.168.110.1
server 166.177.132.9
server 112.110.102.2
# In case the internet connection
is broken
# use the internal time clock to keep ntp running
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
#
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
#
driftfile /etc/ntp/drift
#multicastclient # listen on default 224.0.1.1
#broadcastdelay 0.008
# Location of log file. The
file does not exist unless you created it
logfile /var/log/ntp/log
#
# Authentication delay. If you use, or plan to use someday, the
# authentication facility you should make the programs in the auth_stuff
# directory and figure out what this number should be on your machine.
#
authenticate no
#
# Keys file. If you want to diddle your server at run time, make a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
#
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
# systems might be able to reset your clock at will. Note also that
# ntpd is started with a -A flag, disabling authentication, that
# will have to be removed as well.
#
#keys /etc/ntp/keys

|