This post was originally written for my university intranet blog this morning.
NTP stands for Ninja Tactical Peoples Network Time Protocol and is a system you can use to keep your system clock accurate by synchronizing it with a time server.
ASIDE: According to Wikipedia its one of the earliest internet protocols still being actively used, having been defined in the mid 1980s… only just a few years before I was come to think of it. Cool.
You'll probably want to use a time server that's geographically closer to you for better accuracy, but adding a few extra doesn't hurt and indeed the relevant NFS applications can determine which is more accurate. This site has a list of freely available time server addresses.
ntpdate updates your system clock from a specified server, and is generally set to run when you boot your computer. Therefore if you shutdown and start your machine frequently it will be run more often and can provide sufficient time synchronisation.
On either BSD append the following lines to
If your computer runs for longer that several days at a time, it's best to configure the
ntpd daemon. It makes changes to your clock by comparing it's current value to a specified server or servers.
/etc/rc.conf file again and append the following lines:
Then create a new
/etc/ntp.conf and fill in your server details, along with the location of a file to record the time drift that you know won't be overwritten or changed by another process, and if you prefer a line to prevent access to your NTP server from other computers:
server ntp.example.com prefer server ntp.example.org server ntp.example.net driftfile /var/db/ntp.drift (not needed for > FreeBSD 6.2) restrict default ignore
AFTERWORD: If you really need to run a version of FreeBSD prior to 5.x, replace