#发现服务器时间不对
date
查看是否安装ntp服务:
rpm -qa|grep ntp
systemctl status ntpd
systemctl start ntpd
其他正常的ntp服务的配置:
发现缺少第一条:
ntp-4.2.6p5-29.el7.centos.2.x86_64
使用yum命令安装,失败,内网环境
离线安装ntp服务:
下载参考网盘:【精选】Linux离线安装NTP服务,内网环境下配置本地时间同步-CSDN博客
将安装包上传到服务器:
rpm -ivh autogen-libopts-5.18-5.el7.x86_64.rpm
rpm -ivh ntp-4.2.6p5-29.el7.centos.2.x86_64.rpm
安装成功
rpm -qa|grep ntp
systemctl status ntpd
systemctl start ntpd
systemctl status ntpd
systemctl enable ntpd
修改/etc/ntp.conf ,后续操作参考linux服务器添加授时服务器NTP配置-CSDN博客
使用date命令检测最终时间与网络时间一致,配置完成。