First, revise the Beijing time zone
Here old left to modify the time zone as the default, if there are other needs, you can modify the corresponding.
The code is as follows |
Copy Code |
Rm-rf/etc/localtime #先删除默认的时区设置
Ln-s/usr/share/zoneinfo/asia/shanghai/etc/localtime #替换上海/Beijing as Default
|
Second, manually modify the current system time
The code is as follows |
Copy Code |
Date-s ' 14:48:00 2014-12-29 '
|
Here, the old left is modified for the current time.
Third, set synchronization time
The code is as follows |
Copy Code |
Ntpdate us.pool.ntp.org
|
Set synchronization server time, after installation, we use date to test the current time.
General VPS have installed NTP, if not installed we need to first install Yum install-y NTP (CentOS system).
Summary, so that we through the above 3 steps on the fast implementation of the Linux VPS system time and the current needs of the timezone and time synchronization, to ensure the normal operation of the project.