1.安装ntp服务客户端
rpm -ivh ntp-4.2.4p8-1.3.28.x86_64.rpm
2.vi /etc/ntp.conf,指定时间同步的server域名
server ntp7.aliyun.com iburst
3.重启ntp服务
/sbin/service ntp restart
4.查看ntp状态
/sbin/service ntp status
5.测试同步时间
ntpdate ntp7.aliyun.com
6.写进定时任务(这样每天5:10自动进行网络校时,并同时更新BIOS的时间),使用命令 crontab -e
10 5 * * * root ntpdate ntp7.aliyun.com;hwclock -w
7.重启定时任务
service cron restart