先設置時區:
# tzsetup
再與國家授時中心服務器對時:
# ntpdate 210.72.145.44
以后自動同步:
首先修改/etc/rc.conf添加ntpd_enable="YES"到最后一行。
然后配置對時服務器:
# vi /etc/ntp.conf
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
/var/run/xntpd.pid
參考:
FreeBSD系統時間調整
讓FreeBSD使用ntpd同步時間
FreeBSD連載23:配置系統時間
freebsd系統時間同步及ntp服務的提供
中國國家授時中心的時間服務器IP地址
中國大概能用的NTP服務器地址