Getting ntpd to work correctly on RHEL

linux.jpgWhen many new servers are delivered from the factory, the system clock is way off. Most UNIX systems run “ntpd” to keep the time in sync with internet time servers, which are, in turn synchronized against an atomic clock. This results in a system time that is very very close to the “actual” time of day. The downside, however, is that even a properly configured “ntpd” will not synchronize the system clock if it is too far out of sync with the time server. To remedy this, we first have to run “ntpdate” to get the system clock close to the correct time, and then enable “ntpd” to keep it there.

The first thing we have to do is “ntpd” to free up the port for “ntpdate”:

[root@server /]# /sbin/service ntpd stop
Shutting down ntpd:                                        [  OK  ]

This frees up the port for ntpdate. Next we run:

[root@server /]# /usr/sbin/ntpdate time.apple.com

Now the time should be set correctly. We then change the default time servers to something like the following in /etc/ntp.conf:

# --- OUR TIMESERVERS -----
time-a.timefreq.bldrdoc.gov
time-b.timefreq.bldrdoc.gov
time-c.timefreq.bldrdoc.gov

We can use any time server we want, but I like these and find them to be reliable.

Finally, start backup up your “ntpd” service, and your all set to go.

[root@server /]# /sbin/service ntpd start
Starting ntpd:                                        [  OK  ]

Remember to use “chkconfig” to make sure “ntpd” is enabled to come up when the system starts.

Discuss This Article


One Response to “Getting ntpd to work correctly on RHEL”

  1. Roman on January 29th, 2007 2:35 am #

    I am using this time source:
    64.236.96.53

    It works good !
    ————————
    Thank you for your explanation. It easy to read & understand. I solved my problem :-)


Got something to say?






Post Tags (user submitted): RHEL ntp (216) - t (58) - rhel ntpd (41) - rhel4 ntp (38) - ntp RHEL (34) - rhel ntp server (28) - NTP RHEL4 (26) - ntpd RHEL (25) - ntpd RHEL4 (21) - rhel ntpdate (20) - rhel4 ntpd (19) - RHEL 5, NTP (17) - configure ntp RHEL (15) - RHEL configure ntp (13) - rhel ntp.conf (13) - RHEL 4 ntp (12) - clock (11) - rhel3 + ntp (9) - ntpdate rhel (9) - rhel4 ntpdate (9) - ntpd rpm (9) - rhel ntp howto (8) - rhel setup ntp (8) - rhel4 configure ntp (8) - f (7) - ntpd howto (7) - rhel4 ntp server (7) - rhel4 ntp howto (7) - ntp rhel 4 (7) - rhel ntp configuration (7) - setting up ntp rhel (6) - ntp.conf RHEL (6) - ntp on rhel4 (6) - rhel 4 ntpd (6) - NTP setup RHEL (6) - rhel4 ntp setup (6) - RHEL4 ntp.conf (5) - rhel ntp commands (5) - rhel ntp setup (5) - rhel4 ntp rpm (5) - ntp server rhel4 (5) - redhat ntpd (5) - configure ntp rhel4 (5) - ntp +configuration +rhel (5) - ntp howto (5) - rhel sync time (5) - rhel ntpd configuration (5) - all (5) - rhel4 ntp configuration (4) - ntp server rhel (4) - configure ntp on rhel (4) - rhel 5 ntpd (4) - rhel set time (4) - ntp rhel 5 (4) - rhel ntp sync (4) - ntpdate RHEL4 (4) - setup ntp rhel (4) - RHEL ntp config (4) - ntp rpm RHEL4 (3) - ntpd rhel rpm (3) - rhel ntp settings (3) - rhel 5 ntpdate (3) - rhel 5 ntp sync (3) - rhel5 ntp (3) - ntpd RHEL4 rpm (3) - configuring ntpd on RHEL4 (3) - ntpdate (3) - ntp rhel5 (3) - rhel ntpd server (3) - rhel ntpd setup (3) - rhel chkconfig (3) - rpm ntpd (3) - rhel synchronize ntp (3) - configure ntp redhat 4 (3) - xntpd rhel (3) - ntp rhel 3 (3) - rhel5 configure ntp (3) - rhel4 setup ntp (3) - ntpd config rhel (3) - "redhat ntp" (3) - rhel ntp information (3) - redhat rhel ntp (3) - rhel timeserver (3) - "RHEL4" + "time server" (3) - rhel4 "set time" (3) - redhat ntp howto (3) - RHEL set ntp (3) - rhel time (3) - ntpdate port (3) - rhel 3 ntp (3) - enabling ntp on rhel (2) - ntp setup rhel5 (2) - rhel ntp how to (2) - setting up ntp on rhel (2) - RHEL setup ntpd (2) - rhel ntpd configure (2) - rhel configure ntpd (2) - rhel ntpd conf (2) - "ntp.conf" +RHEL4 (2) - rhel4 ntp sync (2) - how to setup a time server rhel (2) - rhel ntp configure (2) - RHEL4 NTP linux (2) - rhel3 ntpd server (2) - "rhel 5" ntp.conf server (2) - NTP server in RHEL4 (2) - rhel ntp active directory (2) - ntp for rhel4 (2) - rhel 5 ntp configuration (2) - rhel 5 configure ntp (2) - ntp howto rhel (2) - setup ntp on rhel4 (2) - setup ntp rhel4 (2) - how to configure ntp in rhel5 (2) - configure ntp RHEL 4 (2) - sync with ntp server rhel (2) - howto setup ntpd (2) - rhel3 ntpd (2) - ntp.conf rhel4 example (2) - RHEL ntpdate sync (2) - ntp linux rhel (2) - setup ntp server +rhel (2) - ntp + RHEL3 (2) - ntp rhel servers (2) - ntp server RHEL 4 (2) - start ntpd rhel (2) - rhel ntp port (2) - ntpd server rhel (2) - rhel ntp date (2) - ntp rhel configuration (2) - rhel4 configure time (2) - ntpd port (2) - ntpd not setting time correctly (2) - setup ntpd RHEL (2) - linux ntpd port (2) - set up ntp rhel (2) - rpm ntp rhel (2) - rhel set up ntp (2) - rhel5 ntpdate (2) - RHEL4 set ntp (2) - RHEL 5 ntp server (2) - rhel ntp rpm (2) - ntpdate RHEL4 rpm (2) - RHEL ntp server howto (2) - rhel4 sync ntp (2) - set time rhel (2) - rhel time sync (2) - RHEL4 setup ntp set clock (2) - rhel4 configure ntpd (2) - ntp rpm RHEL (2) -