A:與阿里云同步 ntpdate ntp4.aliyun.com
B: 局域網內部與某一個節點同步
1、服務節點安裝ntpd軟體,并啟動,
2、修改配置/etc/ntp.conf
a)解開第18行的注釋,并將網段設定正確
restrict 192.168.10.0 mask 255.255.255.0 nomodify notrap
b)注釋掉第22-25行
#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
c)在檔案最后 添加兩個設定
server 127.127.1.0
fudge 127.127.1.0 stratum 10
3、修改組態檔/etc/sysconfig/ntpd
保證BIOS與系統時間同步 添加SYNC_HWLOCK=yes ,保存退出
4、重啟ntpd 服務
/etc/init.d ntpd restart
5、到其他節點執行同步命令
ntpdate 192.168.10.132(時鐘同步服務器的IP)
6、驗證
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/159642.html
標籤:其他
上一篇:云上網路安全
