检查当前时间
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