1、安装NTP组件
# yum -y install ntpdate
2、添加定时任务(每小时同步一次)
# crontab -e 0 */1 * * * /usr/sbin/ntpdate -u ntp.aliyun.com > /dev/null 2>&1; /sbin/hwclock -w
3、重启服务
service crond restart
1、安装NTP组件
# yum -y install ntpdate
2、添加定时任务(每小时同步一次)
# crontab -e 0 */1 * * * /usr/sbin/ntpdate -u ntp.aliyun.com > /dev/null 2>&1; /sbin/hwclock -w
3、重启服务
service crond restart
发表评论