登录运管卸载运管NTP服务。
步骤1 SSH登录服务器后台
步骤2 输入date,查看当前时间
步骤3 输入ntpdate -u 10.12.132.230,使用ntpdate先进行校时,防止和NTP服务器时间差过大无法自动校时
步骤1 SSH登录服务器
步骤2 输入systemctl start ntpd.service,开启系统NTP服务
步骤3 输入systemctl status ntpd.service,查看服务是active (running)说明系统NTP服务运行正常
步骤1 输入vi /etc/ntp.conf,编辑ntp.conf配置文件
步骤2 输入server 10.12.132.230 iburst,添加NTP服务器的IP
步骤3 加#注释掉原来的NTP服务器
步骤4 按“Esc”键退出编辑模式,输入:wq保存退出
参数补充:
tos maxdist 15:使用偏差超过1.5s的时钟源或者使用windows的W32Time作为NTP服务器需要配置tos maxdist 15,否则无法校时。
tinker panic 0:当服务器时间与本地时间超过1000s,无法进行校时,添加tinker panic 0配置可以避免这个问题。
步骤1 输入systemctl restart ntpd.service,重启系统NTP服务
步骤2 输入systemctl status ntpd.service,查看系统NTP状态是否是active (running)正在运行
步骤1 输入ntpstat,显示synchronised表示已经正常同步校时
步骤2 输入ntpq –pn,在remote中显示有*表示已经正常同步校时
步骤3 输入date,和时钟源服务器对比,如图1-10,时间一致表示已经正常同步校时