Centos8系统时间不同步解决方案

Centos7及以下的都是采用NTP来解决时间同步问题,在Centos8后工具被chrony替代。

解决方案

yum install -y chrony
systemctl start chronyd   # 启动程序
systemctl enable chronyd  # 设为开机启动
编辑配置文件
vim /etc/chrony.conf

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# pool 2.centos.pool.ntp.org iburst (这一行注释掉,增加以下两行)
server ntp.aliyun.com iburst
server cn.ntp.org.cn iburst
重新加载配置
systemctl restart chronyd.service # 重新加载配置
date  # 再查看己同步为当前日期
分享到:
本文链接:https://blog.renzicu.com/2023/06/149.html
版权声明:本博客所有文章除特别声明外,均采用 CC BY 4.0 许可协议。转载请注明出处!
THE END
二维码
打赏
文章目录
关闭
目 录