Penguin
Note: You are viewing an old revision of this page. View the current version.

Install the NTP daemon (Debian/Ubuntu)

  • sudo aptitude install ntp

Now use your favorite text editor to add the NTPServers you wish to synchronize your clock with:

  • echo "server nz.pool.ntp.org" >> /etc/ntp.conf

If the time on the local server is very different from that of its primary time server your NTP daemon will eventually terminate, so we will first set the system time based on the time reported by the NTP server.

Stop the NTP daemon:

  • sudo /etc/init.d/ntp stop

Now run ntpdate

  • sudo ntpdate nz.pool.ntp.org

NB Even ntpdate(8) gradually adjusts the time if within a certain time range. If you don't want this behaviour use the -b option.

Now you can start the daemon

  • sudo /etc/init.d/ntp start

See also TimeNotes


CategoryNotes