1、关闭防火墙
systemctl stop firewalld.service
确认关闭:systemctl status firewalld.service
2、安装ntp包
yum install ntp -y
确认安装:rpm -qa|grep ntp
3、编辑配置文件:/etc/ntp.conf
vim /etc/ntp.conf
4、重启ntp服务
systemctl restart ntpd重启服务
确认服务开启systemctl status ntpd
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
linux同步时间
1、先关闭ntpd服务
systemctl stop ntpd
2、同步
ntpdate 10.10.7.250
3、开启ntpd服务
systemctl start ntpd