首页 > 技术文章 > 如何让centos的时间与网络时间服务器同步

omage 2020-06-13 22:25 原文

安装ntp服务 

sudo yum install ntp

sudo systemctl enable ntpd

修改NTP配置

vi /etc/ntp.conf

将时间服务器换成国内的

server 0.cn.pool.ntp.org
server 1.cn.pool.ntp.org
server 2.cn.pool.ntp.org
server 3.cn.pool.ntp.org

重启NTP服务

sudo systemctl restart ntpd

检查时间是否同步

date

 

参考

https://www.howtogeek.com/tips/how-to-sync-your-linux-server-time-with-network-time-servers-ntp/

推荐阅读