时区EST修改为CST
mv /etc/localtime /etc/localtime.bak
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
chronyc
yum -y install chrony
vi /etc/chrony.conf :
server ntp1.aliyun.com iburst
systemctl enable chronyd.service && systemctl start chronyd.service
常用命令
查看时间同步源:
chronyc sources -v
立即手工同步
chronyc -a makestep
查看时间同步源状态:
chronyc sourcestats -v
设置硬件时间
硬件时间默认为UTC:
timedatectl set-local-rtc 1
启用NTP时间同步:
timedatectl set-ntp yes
校准时间服务器:
chronyc tracking