世赛题目.note

noteId: WEBf7643b025cad21d0fe21256beb2e7c04 · 原始路径:/ALL/Linux - A模块/服务配置/NTP、chrony 时间同步服务器-123端口UDP/(UDP 123端口)NTP服务配置 合集/世赛题目.note · 图片:2 · 附件待处理:0

 
一、使用 timedatectl timesync-status 查看时间同步状态:
· 需要使用 systemd-timesyncd 软件包 作为 NTP客户端:
 
1、配置 systemd-timesyncd:
apt install -y systemd-timesyncd
vim /etc/systemd/timesyncd.conf
· 重启服务:
systemctl restart systemd-timesyncd
 
2、使用 timedatectl timesync-status 查看时间:
如果同步成功,则将会看到有时间偏移