Keeping your clock current, automatically

May 1, 2008

If you have a system which is doing something important such as handling mail, or running as firewall, it’s essential that you keep the correct date and time. This allows your logs to have the correct timestamps upon them. If you’re collecting logs from multiple hosts time becomes even more important. Having the logfiles with wrong dates and times means that you’ll be comparing entries out of order.

Thankfully there exists a simple protocol for keeping the dates and times of computers connected to a network in sync. It is called NTP, the Network Time Protocol.

There are several packages related to NTP in the Debian archive, probably the simplest is the client ntpdate.

Install it by running, as root, apt-get install ntpdate, and your machine will be automatically setup to sync time from the public servers which have the name pool.ntp.org.

If you wish to change them to point to an internal time server of your own you can adjust this by editting the file /etc/default/ntpdate.

Source: http://www.debian-administration.org/articles/25


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: