##cnetos7更新时间
##yum安装ntpdate工具
yum -y install ntp ntpdate
##设置系统时间与网络时间同步
ntpdate cn.pool.ntp.org
##将系统时间写入硬件时间
hwclock --systohc
##强制系统时间写入CMOS中防止重启失效
hwclock -w
或者
clock -w
##cnetos7更新时间
##yum安装ntpdate工具
yum -y install ntp ntpdate
##设置系统时间与网络时间同步
ntpdate cn.pool.ntp.org
##将系统时间写入硬件时间
hwclock --systohc
##强制系统时间写入CMOS中防止重启失效
hwclock -w
或者
clock -w