Friday, October 05, 2012

Setup ntpd

To synchronize your unix to the HK time servers:

1.    service stop ntpd
2.    ntpdate hk.pool.ntp.org  // we set a sensible time first
3.    vi /etc/ntp.conf and put the followings.

server 0.hk.pool.ntp.org
server 1.hk.pool.ntp.org
server 2.hk.pool.ntp.org

driftfile /var/lib/ntp/drift

4.    service start ntpd

Soon, you will see the ntp status.  For illustration:
#ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*203.129.68.14   192.168.51.202   2 u   60   64   17    7.094    7.683   3.114
+202.131.74.126  210.0.235.14     3 u   61   64   17   10.296    6.702   4.906
 127.127.1.0     .LOCL.          10 l    -   64   37    0.000    0.000   0.008

The actual ip addresses will be different as you are assigned random servers from the pool.  The important thing is the '*' sign in front of one of them, meaning that your server is now getting time from internet.

Troubleshooting
If you are unable to synchronize with the time servers, please check that UDP port 123 is opened.


6 comments:

  1. Service ntpd start, not service start nptd

    ReplyDelete

  2. Thank you very much for your information.
    Australia ETA/eVisitor Visa
    is quiet easy to apply online from Singapore,
    Malaysia, United Kingdom, United States, Canada, France and including all others ETA Eligible Countries from our website.

    ReplyDelete
  3. Abu Dhabi is the largest of the seven Emirates and the Federal capital of the United Arab Emirates. Abu Dhabi is best known for its culture & heritage; one of the most progressive and pioneering spots, being ranked as the world’s richest city.abu dhabi city tour

    ReplyDelete
  4. Hatta Trip is a desert safari with mountain driving along the valleys of the Hajjar Mountains beside the Oasis of Hatta. We pick up the tourists by 4WD vehicles at 8.30 Hrs, pass through Al Aweer and drive through the Golden sand dunes towards the Oasis of Hatta. Enroute we have enough opportunity to see the Desert life including few of the Bedouin tents and grazing camelsHatta tour

    ReplyDelete
  5. Dubai city tour is all about remarkable transformation – from a small pearl village to a world class epicenter of 5 star experiences – that is Dubai, UAE’s pride! Over the years Dubai has become the leading destination for holidays around the world. It has to be; with so many attractions and beautiful sandy beaches to claim, no wonder that millions flock to this city to see what it’s about. Take a city tour Dubai and experience for yourself.
    Dubai city tour

    ReplyDelete