如何让centos的时间与网络时间服务器同步
安装ntp服务
sudo yum install ntp
sudo systemctl enable ntpd
修改NTP配置
vi /etc/ntp.conf
将时间服务器换成国内的
server0.cn.pool.ntp.orgserver1.cn.pool.ntp.orgserver2.cn.pool.ntp.orgserver3.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/
浙公网安备 33010602011771号