Debian: Synchronizing server time with NTP
By Abner | March 14, 2010
It’s a good practice to have all the servers synchronized with the same date & time, no matter what servers you’re using (windows, linux, mac, aix, etc). It’s a quite simple configuration to avoid any kind of problems related with time, some applications specify this requirement other don’t so please don’t wait until you have problems to apply this simple config.
Configuring Debian GNU/LiNUX to use a public NTP Server is simple, just do this:
$ sudo aptitude install ntpdate
The ntpdate package includes the file /etc/if-up.d/ntpdate that runs /usr/bin/ntpdate-debian after an interface (eth0, eth1, etc.) is up so you won’t have to worry about configuring this synchronizing process to run automatically. Let’s run it manually so we apply the time from the NTP Server right now:
$ sudo ntpdate-debian 14 Mar 21:41:50 ntpdate[10808]: step time server 146.164.48.5 offset -0.589987 sec
That’s it! This is the simple way but if you want to try a more advance config just read /usr/share/doc/ntpdate/README.Debian and /etc/default/ntpdate files in your server.





