четверг, 23 октября 2014 г.

How to set time zone in VPS on node (OpenVZ).

Source, thanks to author
Solution ::-

Please follows the below steps to set the time zone for a particular node in VPS.

1) Login to the main server node via ssh.

2) Stop the node(container) which you want to set time.
------------------
# vzctl stop 1000 >>>>> 1000 = Container ID
------------------

3) Set the container to have capability to change the time zone.
------------------
# vzctl set 1000 --capability sys_time:on --save
------------------

4) Start the container and login to it.
------------------
# vzctl start 1000
# vzctl enter 1000
------------------

5) Change your local timezone with below process.
------------------
# mv /etc/localtime /etc/localtime_bk
# ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
------------------

6) Set the date and time
------------------
# date 051717302013
time has been set to 17:30 on 17th may 2013
(05-Month, 17-Day, 5-Hours, 31-Minutes, 2013 -Year
------------------

Комментариев нет:

Отправить комментарий

Примечание. Отправлять комментарии могут только участники этого блога.