linux/CentOS time synchronization

The newly installed cluster (CentOS 6.6) runs the program and finds that the time is wrong. It is necessary to reset the time and synchronize the network.

Execute the following command in the terminal command:

1). vi /etc/sysconfig/clock #Edit the time configuration file

    ZONE="Asia/Shanghai"

    UTC=false #Set to false, the hardware clock is not consistent with the UTC time

    ARC=false

2). cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #linux time zone is set to Shanghai time zone

3). ntpdate cn.pool.ntp.org #align  the time    

4). /sbin/hwclock --systohc #Set the hardware time to be consistent with the system time and calibrate

After the above steps, our CentOS linux system time and computer hardware time are finally cst time, and both are in Shanghai time zone.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324518145&siteId=291194637