NTP Setup and Boot time configuration

Network Time Protocol can be setup very easily on linux. Just use below command.

The IPs / Domains that we will give are the IP of the NTP servers from which we want to synchronize the time. 

ntpdate -q  ( We are querying if the NTP server is accessible)

ntpdate  ( Doing actual sync )


ntpdate mysite.domain.com

Many times, in better infrastructure, you may have more than one NTP server. In that case, you have to give all address simultaneously.


However, in most of the cases, this is not enough. You will find that whenever you reboot the sever, the time is getting unsynchronized. To fix that, you have to edit file /etc/ntp.conf and put below entries:

server iburst
server iburst
server iburst

The 'iburst' is optional and is a directive to speed up the synchronization.