Working with Linux howtos

Accurate Time with NTP

Accurate time is a "good thing".  NTP (Network Time Protocol) lets you have it by keeping your server in sync with other (presumably accurate) server times.

Note: NTP is already running by default on RimuHosting servers).

Grab the RPM and install it: rpm -Uvf ntp-4.1.1a-9.i386.rpm libcap-1.10-12.i386.rpm

Tip: RPMFind.net is a great place to find the right RPM for you server installation.

Pop some servers in /etc/ntp.conf:

server tick.uh.edu
server time.nist.gov
server tick.usno.navy.mil
# choose your own servers from here: http://www.eecis.udel.edu/~mills/ntp/servers.html
driftfile /etc/ntp/ntp.drift

You should use more than one NTP server so that NTP can adjudicate time discrepancies.   There is no point only having a single server listed.  If that server's sysadmin then does some Y2100 testing it will cause your server's date to follow in lockstep.

Install it as a service:

chkconfig --add ntpd
chkconfig --level 35 ntpd on
/etc/init.d/ntpd start

A good NTP read: http://linux.oreillynet.com/pub/a/linux/2003/01/02/ntp.html

Resolving: Can't open /etc/ntp/ntp.drift.TEMP: Permission denied.

The fix to this permissions error to to run touch /etc/ntp/ntp.drift /etc/ntp/ntp.drift.TEMP; chown ntp /etc/ntp /etc/ntp/ntp.drift /etc/ntp/ntp.drift.TEMP