安裝 systemd-timesyncd 套件
apt install systemd-timesyncd
timedatectl set-ntp true
systemctl start systemd-timesyncd
檢查服務狀態
systemctl status systemd-timesyncd
修改設定檔 /etc/systemd/timesyncd.conf
vi /etc/systemd/timesyncd.conf
[Time]
NTP=x.x.x.x
#FallbackNTP=ntp.ubuntu.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
重啟 systemd-timesyncd 服務
systemctl restart systemd-timesyncd
驗證設定
timedatectl show-timesync --all
再確認一次服務狀態
systemctl status systemd-timesyncd
應該可以看到己經向NTP server重新校時
沒有留言:
張貼留言