云安装ntpdate:
yum install -y ntpdate
网络时间同步命令:
ntpdate -u cn.pool.ntp.org
若不加上-u参数, 会出现以下提示:
no server suitable for synchronization found
,-u参数可以越过防火墙与主机同步,cn.pool.ntp.org 中国开源免费NTP服务器
设置时区:
timedatectl set-timezone Asia/Shanghai
开机启动服务:
systemctl enable ntpd



