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