Centos7安裝NTP服務器


一、准備服務器,三台服務器  

192.168.207.133(server端)

192.168.207.137(client端)

192.168.207.132(client端)

二、安裝server端

2.1 yum安裝

yum install ntp ntpdate

2.2 編輯配置文件

vim /etc/ntp.conf

#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst

server 192.168.207.133
fudge 127.127.1.0 stratum 11

2.3. 啟動服務

systemctl start ntpd

systemctl enable ntpd.service #設置開機啟動服務 

三、安裝客戶端

3.1  yum安裝

yum install ntp ntpdate

3.2 同步時間

ntpdate -d -b 192.168.207.133

3.3 編輯配置文件

和server端相同

3.4 啟動服務

systemctl start ntpd

systemctl enable ntpd.service #設置開機啟動服務 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM