1.安装ntp
yum -y install ntpdate
2.修改系统时区
cp /etc/localtime /etc/localtime.bak
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
3.手动执行时区同步
ntpdate cn.pool.ntp.org
或者
/usr/***in/ntpdate 182.92.12.11
4.计划任务
crontab -e
*/5 * * * * /usr/***in/ntpdate time.windows.com >/dev/null 2>&1
5.查看是否生效
cat /var/spool/mail/root
data -R
6.写入BIOS
hwclock -w
或
clock -w