Centos7离线安装 NTP 服务
NTP 时间同步
配置的NTP服务IP地址:172.17.3.11
下载离线安装包
离线安装 NTP 服务,下载链接:
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/ntp-4.2.6p5-29.el7.centos.2.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/ntpdate-4.2.6p5-29.el7.centos.2.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/autogen-libopts-5.18-5.el7.x86_64.rpm
安装
rpm -ivh autogen-libopts-5.18-5.el7.x86_64.rpm
rpm -ivh ntpdate-4.2.6p5-29.el7.centos.2.x86_64.rpm
rpm -ivh ntp-4.2.6p5-29.el7.centos.2.x86_64.rpm
修改配置文件 /etc/ntp.conf
server 172.17.3.11 iburst
启动服务
systemctl enable ntpd
systemctl start ntpd
systemctl status ntpd
systemctl restart ntpd
# 停止
systemctl stop ntpd
## 手动同步, 停止 ntp 服务后执行(否则会报the NTP socket is in use, exiting)
ntpdate 172.17.3.11