linux centos7 同步北京时间
安装ntpdate
yum install ntpdate
ntpdate -u ntp.api.bz //直接用域名同步中国上海时间 是阿里云的服务器
ntp常用服务器:
中国国家授时中心:210.72.145.44
NTP服务器(上海) :ntp.api.bz
做个定时
crontab -e
0 5 * * * ntpdate -u ntp.api.bz #5点时间同步
以下是一些可能可以用的NTP服务器地址(仅供参考,网上找的)