To install, on debian, just use:
$ aptitude install ntp
Then after that, you can start your ntp daemon. To do this, just type, as root:
$ /etc/init.d/ntp start
That should give you the utmost correct time.
Suppose you would like to edit your configuration to use the local time server or a time server in your department. Well, all you need to do is to edit /etc/ntp.conf. I've added these lines to add the server in my department.
server ntp1.cs.kent.edu iburst dynamic
server ntp2.cs.kent.edu iburst dynamic
server time.kent.edu iburst dynamic
server 0.debian.pool.ntp.org iburst dynamic
and rerun ntp daemon with:
$ /etc/init.d/ntp restart
Now, some of you might be a little curious on the options given to the servers. Well here is an explanation taken from the man page.
|When the server is unreachable and at each poll interval, send a burst of eight packets instead of the usual one. As long as the server is unreachable, the spacing between packets is about 16s to allow a modem call to complete. Once the server is reachable, the spacing between packets is about 2s. This is designed to speed the initial synchronization acquisition with the server command and s addresses and when ntpd(8) is started with the -q option.|
Now, I can't find a good explanation for dynamic option on the web. But I'm sure since the original .conf file has it, so I'm just going to keep the dynamic option there.
There are people who thinks that we might as well use a ntp-client like ntpdate to synchronize time, however, ntpdate needs to be run manually or by cron. It is however more resource friendly, and only runs when you want it to run, unlike ntp server which would be running as a server all the time. However, there is an issue about time drift. And the problem with ntpdate, it does not have the algorithm to handle time drift. Hence, since I'm a little obsessed about time to the milliseconds, time drifts is an important thing for me, and ntp has the algorithm to calculate the time drift and readjusting time as necessary. :) Hope that helps, comments by experts are highly appreciated to get a better understanding of things, questions are also welcomed.