安装ntpdate
yum -y install ntpdate
查看当前时间
date
同步当前时间
NTP服务器参见(http://www.ntp.org.cn/)
ntpdate cn.ntp.org.cn
加入定时任务
执行: crontab -e
打开定时任务编辑界面,输入 * */1 * * * ntpdate cn.ntp.org.cn
每一小时执行一次时间同步
yum -y install ntpdate
date
NTP服务器参见(http://www.ntp.org.cn/)
ntpdate cn.ntp.org.cn
执行: crontab -e
打开定时任务编辑界面,输入 * */1 * * * ntpdate cn.ntp.org.cn
每一小时执行一次时间同步
转载于:https://my.oschina.net/u/1476134/blog/775744