天天看點

FreeBSD系統時間調整

先設定時區:

# 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