# timedatectl status 查看当前时间1 yum install ntp //安装ntp服务 2 systemctl enable ntpd //开机启动服务 3 systemctl start ntpd //启动服务 4 timedatectl set-timezone Asia/Shanghai //更改时区 5 timedatectl set-ntp yes //启用ntp同步 6 ntpq -p //同步时间