inCentos7更新时间
1、安装ntpdate工具 yum -y install ntp ntpdate
2、执行命令(同步系统时间和网络时间)cn.pool.ntp.org (ntpdate 0.asia.pool.ntp.org这个效果不好)
3、将系统时间写入硬件时间 hwclock --systohc
Centos7更新时间一直不准确,可能是时区的问题
1、查看时区date
2、不正确先调整时区,命令tzselect
3、修改时区ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ll /etc/localtime
l /usr/share/zoneinfo/Asia/Shangha
4、再次使用ntpdate同步时间 ntpdate cn.pool.ntp.org (0.asia.pool.ntp.org)
5、将系统时间写入硬件时间 hwclock --systohc