Tfb*_*fb9 10
Ubuntu 16.04 默认使用服务器ntp.ubuntu.com[参考]。
要更改默认服务器,请使用编辑器编辑配置文件:
sudo vi /etc/systemd/timesyncd.conf
Run Code Online (Sandbox Code Playgroud)
取消注释该NPT=行并定义要使用的服务器而不是默认服务器:
[Time]
NTP=some.ntp.server.com
Run Code Online (Sandbox Code Playgroud)
要“审核”时间同步事件并验证所联系的服务器,请使用以下命令:
cat /var/log/syslog | grep systemd-timesyncd
Run Code Online (Sandbox Code Playgroud)
根据官方文档:https : //help.ubuntu.com/lts/serverguide/NTP.html
可以在 /etc/systemd/timesyncd.conf 中指定用于获取 timedatectl 和 timesyncd 时间的名称服务器,并在 /etc/systemd/timesyncd.conf.d/ 中使用灵活的附加配置文件。
| 归档时间: |
|
| 查看次数: |
15262 次 |
| 最近记录: |