设置时间并开启时间同步
# 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 //同步时间
# 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 //同步时间