离线安装文件链接:https://pan.baidu.com/s/1SmvfcTQBTtaVsVjJBgixvQ
提取码:2ij8
将三个安装文件上传至服务器/home/ntp目录下,执行下面命令,如下图:
rpm -ivh --force /home/ntp/autogen-libopts-5.18-5.el7.x86_64.rpm
rpm -ivh --force /home/ntp/ntpdate-4.2.6p5-29.el7.centos.2.x86_64.rpm
rpm -ivh --force /home/ntp/ntp-4.2.6p5-29.el7.centos.2.x86_64.rpm
–校准服务器时间 执行下面命令
ntpdate ntpl.aliyun.com
有些服务器无法访问域名,可切换为IP校准服务器时间
ntpdate 120.25.115.20
– 将系统时间同步到硬件时间
hwclock -w