1. 安装并启动 chrony
sudo dnf install -y chrony
sudo systemctl enable --now chronyd
2. 配置国内时间服务器(更准更快)
sudo tee /etc/chrony.conf <<'EOF'
server ntp.ntsc.ac.cn iburst
server ntp.aliyun.com iburst
server cn.ntp.org.cn iburst
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
allow 192.168.0.0/16
logdir /var/log/chrony
EOF
3. 重启生效
sudo systemctl restart chronyd
4. 查看同步状态
chronyc sources -v
出现 ^* 或 ^+ 表示正在同步。
5. 查看当前时间
timedatectl
看到 System clock synchronized: yes 就成功了。


2300

被折叠的 条评论
为什么被折叠?



