歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> BSD >> 讓FreeBSD使用ntpd同步時間

讓FreeBSD使用ntpd同步時間

日期:2017/2/28 11:24:06   编辑:BSD


  我們知道ntpd是一種在後台運行可以使用遠程時間服務器的進程,它可以讓你的服務器時間准確而不會影響系統的正常。
  添加:
CODE:server 210.72.145.44 prefer
server 159.226.154.47
server 127.127.1.0
fudge 127.127.0.1 stratum 5
restrict default ignore
restrict 127.0.0.0 mask 255.0.0.0
restrict 192.168.0.0 mask 255.255.255.0 noquery nopeer notrust
restrict 210.72.145.44 noquery
restrict 159.226.154.47 noquery
driftfile /var/db/ntpd.drift

其中server 210.72.145.44 prefer、server 159.226.154.47、restrict 210.72.145.44 noquery、restrict 159.226.154.47 noquery可以改成其他離你最近或最准確的時間服務器。
  這樣在服務器重啟後ntpd進程就會自動在後台運行,幫助系統同步時間,和在192.168.0這個網段內做一台時間服務器。
Copyright © Linux教程網 All Rights Reserved