Ubuntu/Rackspace – Time/TimeZone issues

Ubuntu/Rackspace – Time issues

— a system’s clock is likely to drift considerably between reboots if the time between reboots is long. In that case it makes sense to correct the time occasionally.

— On rackspace, not all Ubuntu servers are created with UTC as the default time zone. Some get created with CDT.

Solution

To sync with UTC.

# date
Thu Aug 18 00:48:03 CDT 2011
#sudo cp /usr/share/zoneinfo/UTC /etc/localtime
#sudo ntpdate ntp.ubuntu.com
18 Aug 05:51:34 ntpdate[27696]: the NTP socket is in use, exiting
# date
Thu Aug 18 05:51:43 UTC 2011

If you want to sync with EST, change UTC to EST below.

One of our servers drifted off ~3 minutes in 3 months causing an issue.

To automatically synchronize the time.

#sudo apt-get install ntp
This command both installs and starts the ntp daemon.

A bunch of alternatives are mentioned here.

Advertisements

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