NTP配置

1.查询是否安装NTP服务

yum list installed | grep ntp

2.安装NTP服务

yum install -y ntp

3.手动同步时间

ntpdate -u ntp1.aliyun.com

4.查看时区

timedatectl

5.修改时区

rm /etc/localtime

ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

timedatectl set-timezone Asia/Shanghai

6.防火墙放行

firewall-cmd --add-service=ntp --permanent

firewall-cmd --reload

7.检查NTP同步状态

ntpq -p