Archive for October 12, 2013

Xen Linux VPS modify the system time

If you are buying a US LINUX VPS Xen or Xen other countries LINUX VPS,Then,Preferred view and you need to set the time zone:

How to view Xen LINUX VPS time zone?
date -R

Get results similar to the following:
Mon, 05 Sep 2011 16:29:08 +0800

If the rearmost section is not +800,So what do you like to set the time zone,When setting up Xen LINUX district follows:

rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

So your Linux VPS time zone has been set to Chinese Shanghai - the 8th time zone。

sometimes,Buy Xen Linux VPS not only time zone,And the system time is also a big difference,Sometimes related hours。
How to modify Xen Linux VPS time? You need to use ntp time synchronization software to synchronize system time VPS。(If you are Xen VPS or dedicated server,Then you can modify,If OpenVZ VPS,You can not be modified,Modify the server room can only be called the mother of time。)

The method of command is as follows:

yum install -y ntp

vi /etc/sysctl.conf

xen.independent_wallclock = 1 # and the increase in the file save and exit

sysctl -p # we must remember that this step,Otherwise, do not take effect。

ntpdate us.pool.ntp.org

reuse

date -R confirm whether the time is corrected.

Such a good time synchronization。

Comments