Linux 系统时间不准?NTP 时间同步配置与排错

检查当前时间

date
timedatectl status

配置 NTP 同步

yum install ntp -y
systemctl start ntpd
systemctl enable ntpd

# 或使用 chrony(CentOS 7 推荐)
yum install chrony -y
systemctl start chronyd
systemctl enable chronyd

手动同步

ntpdate -u ntp.aliyun.com
# 或
chronyc -a makestep

检查同步状态

ntpq -p
chronyc sources -v

发表评论

京ICP备2022034122号