Linux CentOS服务器时间同步阿里云北京时间

1、查看当前服务器时间
# date -R
Mon, 27 Apr 2020 10:41:54 +0800
2、安装ntpdate服务
# yum install ntpdate
Loaded plugins: fastestmirror
Determining fastest mirrors
3、直接用域名同步中国上海时间 是阿里云的服务器
#timedatectl set-timezone Asia/Shanghai 
# ntpdate ntp1.aliyun.com
27 Apr 10:45:42 ntpdate[6028]: step time server 120.25.115.20 offset 190.621216 sec
4、查看新时间是否已同步
# date -R
Mon, 27 Apr 2020 10:45:51 +0800
原文地址:https://www.cnblogs.com/nsthink-666/p/13218949.html