1.配置/etc/chrony.conf时间同步源IP
sed -i '/server/d' /etc/chrony.conf
sed -i '/pool/d' /etc/chrony.conf
echo 'server 时间同步服务器IP iburst' >> /etc/chrony.conf(关键)
echo 'allow all' >> /etc/chrony.conf
2.停ntpd服务(和chrony有冲突)
systemctl status ntpd
systemctl stop ntpd
systemctl disable ntpd
systemctl status chronyd
3.重启服务
systemctl restart chronyd
systemctl enable chronyd
4.查看同步情况和信息:
chronyc sources -v
timedatectl