ntp

Keep server time in sync with ntp

NTP is a protocol designed to synchronize the clocks of computers over a network, easy to setup and probably comes packaged with the OS.

Here's what was needed on a Fedora-6:

  1. Install the ntp rpm if not already installed.
    # yum install ntp
  2. Open up UDP port 123, both incoming and outgoing on the firewall.
  3. Find a reliable close ntp pool server or you could just use the hub, "pool.ntp.org" and add it to the server list in "/etc/ntp.conf" file.
  4. Make sure your computer's clock is set to something sensible (within a few minutes of the 'true' time) - you could use `ntpdate pool.ntp.org`, or you could just use the date command and set it to your wristwatch, and also synchronize the hardware clock.
  5. Make sure ntp starts up at boot and then start the service:
    # /sbin/chkconfig ntpd on
    # /sbin/service ntpd start
  6. Ater some time if you want to see exactly what is happening, you can run the query command:
    # ntpq -pn localhost
Comment