备份&修改
root@gpu002:/etc/systemd# cp /etc/systemd/timesyncd.conf /etc/systemd/timesyncd.conf.bak.orig
root@gpu002:/etc/systemd# vi /etc/systemd/timesyncd.conf
root@gpu002:/etc/systemd#
修改NTP 指向时间服务器
10.3.170.32 是我的时间服务器
[Time]
NTP=10.3.170.32
#FallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
重启服务
root@gpu002:/etc/systemd# systemctl restart systemd-timesyncd.service
Warning: The unit file, source configuration file or drop-ins of systemd-timesyncd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
root@gpu002:/etc/systemd# systemctl status systemd-timesyncd.service