国家授时中心:ntp.ntsc.ac.cn
更新本服务器的时间
ntpdate -u ntp.ntsc.ac.cn
vi /etc/ntp.conf
server ntp.ntsc.ac.cn
/bin/systemctl restart ntpd.service
注意最好用国家授时中心的地址,阿里云的是分国家,同事用了ntp1.aliyun.com结果差了16个小时
时区
查看
root@node-01 etc]# timedatectl
Local time: Mon 2018-05-07 10:03:07 CST
Universal time: Mon 2018-05-07 02:03:07 UTC
RTC time: Mon 2018-05-07 02:03:04
Time zone: n/a (CST, +0800)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
发现时区是n/a
执行命令
sudo timedatectl set-timezone 'Asia/Shanghai'