This is must if machine is part of multi-server setup.
Once-time sync
ntpdate pool.ntp.org
This will sync clock once but quickly. You will see output like:
8 Apr 19:47:13 ntpdate[30780]: adjust time server 38.229.71.1 offset 0.002989 sec
Automate Sync using NTP Daemon
sudo apt-get install ntp
At this point you can consider job to be finished.
But if you want much better sync, open /etc/ntp.conf file.
Locate default NTP servers like below:
server 0.ubuntu.pool.ntp.org server 1.ubuntu.pool.ntp.org server 2.ubuntu.pool.ntp.org server 3.ubuntu.pool.ntp.org
And replace them with pool near to your server/machine. You can find nearest pool using – http://support.ntp.org/bin/view/Servers/NTPPoolServers
We have maximum servers in US, so we use:
server 0.us.pool.ntp.org server 1.us.pool.ntp.org server 2.us.pool.ntp.org server 3.us.pool.ntp.org
Finally don’t forget to restart ntp
service
service ntp restart