凝思(linx)系统ntp服务

凝思(linx)系统ntp服务,第1张

凝思(linx)系统ntp服务

ntp服务对时

1.修改配置文件

vim /etc/ntp.conf 

server 192.168.3.100 iburst                 # server后面添加对时主机Ip
restrict 192.168.3.0 mask 255.255.255.0    # restrict后面添加需要和本机对时IP

2.重启ntp服务,使对时服务生效

/etc/init.d/ntp restart

3.192.168.3.100 设置本地对时

server 127.127.1.0 iburst  其余server使用#注释掉

4.查看对时是否生效 对时服务器 ip 前有 * 即对时成功。

ntpq -p
remote       refid      st      t      when      poll      reach      delay      offset     jitter
 
==============================================================================================================================
*192.168.3.100 10.240.241.5  4       u        53          64        377       0.240      0.374     0.240

注:ntp首次对时大概需要5分钟左右。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5717300.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存