Set the Time for an Instance

Set the timezone

  1. open the timezone file: sudo vi /etc/sysconfig/clock and in “ZONE” row set your timezone (to view a list of timezones avalable lookup with a ll /usr/share/zoneinfo (and subdir)
  2. create a symlink to that file: sudo ln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime 
  3. reboot to be sure all services and applications are in sync

Set the ntp server

  1. by default amazon ec2 istances are fine with the ntp daemon but try this: sudo service ntpd status
  2. if is not running type: sudo service ntpd start (or restart)
    1. and be sure to run it at startup with: sudo chkconfig ntpd on
  3. check ntp is working and on wich servers with: ntpq -p
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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s