• Getting ntpd to work correctly on RHEL

    When 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.

    This entry was posted on Tuesday, December 19th, 2006 at 10:46 am and is filed under Data and Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  • 1 Comment

    Take a look at some of the responses we've had to this article.

    1. Roman
      Jan 29th
      Reply

      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 :-)

  • Leave a Reply

    Let us know what you thought.

  • Name (required):

    Email (required):

    Website:

    Message:

Visitors have tagged this post: RHEL ntp (473) - ntp RHEL (112) - t (58) - rhel ntp configuration (48) - rhel ntp server (47) - rhel ntpd (43) - rhel4 ntp (38) - clock (34) - redhat ntp sync (27) - NTP RHEL4 (26) - ntpd RHEL (25) - RHEL configure ntp (24) - configure ntp RHEL (24) - ntpd RHEL4 (21) - rhel ntpdate (20) - rhel4 ntpd (19) - ntp on RHEL (19) - rhel ntp setup (19) - RHEL 5, NTP (17) - redhat ntp.conf (17) - rhel ntp sync (16) - rhel ntp client (15) - rhel ntp.conf (14) - RHEL 4 ntp (12) - rhel4 configure ntp (10) - rhel ntp howto (9) - ntpd rpm (9) - rhel setup ntp (9) - ntpdate rhel (9) - rhel4 ntpdate (9) - ntp server rhel (9) - rhel3 + ntp (9) - redhat ntp configuration (9) - rhel4 ntp server (8) - RHEL set ntp (8) - ntpd howto (7) - ntp.conf RHEL (7) - ntp rhel 4 (7) - rhel4 ntp howto (7) - configure ntp rhel4 (7) - configure ntp on rhel (7) - redhat sync ntp (7) - f (7) - ntp in rhel (7) - ntp client RHEL (7) - rhel ntp update (7) - setup ntp rhel (6) - rhel 4 ntpd (6) - rhel4 ntp setup (6) - ntp on rhel4 (6) - NTP setup RHEL (6) - setting up ntp rhel (6) - RHEL enable ntp (6) - redhat ntp update (6) - all (5) - rhel set time (5) - redhat ntp howto (5) - rhel4 ntp rpm (5) - ntp howto (5) - ntp +configuration +rhel (5) - rhel sync time (5) - RHEL4 ntp.conf (5) - redhat ntpd (5) - ntp server rhel4 (5) - rhel ntpd configuration (5) - rhel ntp configure (5) - rhel ntp how to (5) - rhel ntp commands (5) - rhel install ntp (5) - rhel sync ntp (5) - ntp.conf redhat (5) - ntpdate RHEL4 (4) - rhel4 ntp configuration (4) - RHEL ntp config (4) - rhel 5 ntpd (4) - ntp rhel 5 (4) - rhel5 ntp (4) - rhel synchronize ntp (4) - rhel, ntp (4) - NTP configuration RHEL (4) - redhat ntp client (4) - ntpdate (3) - rhel chkconfig (3) - ntpd rhel rpm (3) - rhel ntp service (3) - rhel ntp setting (3) - enable NTP RHEL (3) - redhat rhel ntp (3) - ntpdate port (3) - rhel4 "set time" (3) - "RHEL4" + "time server" (3) - configure ntp in RHEL (3) - xntpd rhel (3) - configure ntp redhat 4 (3) - rpm ntpd (3) - rhel ntpd setup (3) - "redhat ntp" (3) - ntp rhel 3 (3) - ntp rpm RHEL4 (3) - configure redhat ntp (3) - rhel ntpd server (3) - rhel 3 ntp (3) - rhel time (3) - ntpd RHEL4 rpm (3) - rhel timeserver (3) - start ntpd rhel (3) - rhel5 configure ntp (3) - ntpd config rhel (3) - rhel4 setup ntp (3) - setup ntp on RHEL (3) - ntp sync RHEL (3) - rhel 5 ntpdate (3) - rhel ntpq (3) - ntp rhel5 (3) - how to configure ntp server on rhel (3) - enabling ntp on rhel (3) - configuring ntpd on RHEL4 (3) - setting ntp on rhel (3) - rhel ntp settings (3) - rhel ntp information (3) - rhel 5 ntp sync (3) - sync ntp rhel (3) - running ntpd on RHEL 5 (3) - install ntp RHEL (3) - redhat ntpd configuration (3) - redhat ntp conf (3) - configuring ntp rhel (3) - redhat enable ntp (3) - redhat ntp commands (3) - ntp sync redhat (3) - ntpd (2) - mss (2) - set ntp in RHEL (2) - rhel4 chkconfig (2) - rhel4 ntp start (2) - ntp rpm RHEL (2) - ntpd close port (2) - ntpd service enable (2) - how to enable ntp in unix (2) - set time rhel (2) - rhel time ntp (2) - RHEL Linux NTP (2) - rhel4 time (2) - ntpd rhel 4 (2) - rhel ntpd rpm (2) - ntp redhat (2) - setup rhel as a time server (2) - configuring ntp +redhat (2) - RHEL xntp (2) - ntpd service (2) -