centos网络同步时间
自动与时间服务器上的时间同步
安装ntpdate工具
yum install ntp ntpdate -y
设置系统时间与网络时间同步
ntpdate cn.pool.ntp.org
将系统时间同步到硬件时间
hwclock --systohc
强制系统时间写入CMOS中防止重启失效
hwclock -w
自动与时间服务器上的时间同步
yum install ntp ntpdate -y
ntpdate cn.pool.ntp.org
hwclock --systohc
hwclock -w