ntpd服务

yum -y install ntp

服务器端

[root@ip-172-31-6-148~]# vim /etc/ntp.conf 
...
# Use public servers from thepool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server  127.127.1.0     #local clock
fudge   127.127.1.0 stratum 10

 

客户端节点

vim /etc/ntp.conf 

 

server 172.31.6.148 iburst

==================

[root@ip-172-31-6-148~]# ntpq -p
     remote           refid      stt when poll reach   delay   offset jitter
==============================================================================
*LOCAL(0)        .LOCL.         10 l   15   64    7    0.000   0.000   0.001
[root@ip-172-31-6-148 ~]# ssh -i fayson.pem.txtip-172-31-5-190.fayson.com "ntpq-p"
     remote           refid      st t when pollreach   delay   offset jitter
==============================================================================
*ip-172-31-6-148 LOCAL(0)        11 u   68  128 377    0.274    1.005   0.243
[root@ip-172-31-6-148 ~]# ssh -i fayson.pem.txtip-172-31-10-118.fayson.com "ntpq-p"               
     remote           refid      stt when poll reach   delay   offset jitter
==============================================================================
*ip-172-31-6-148 LOCAL(0)        11 u  75 128  377    0.285    1.214  0.213
[root@ip-172-31-6-148 ~]# ssh -i fayson.pem.txt ip-172-31-9-33.fayson.com"ntpq -p"                
     remote           refid      stt when poll reach   delay   offset jitter
==============================================================================
*ip-172-31-6-148 LOCAL(0)        11 u    1   64 367    0.294   -9.249   1.511

注:标记部分,有“*”显示则表示同步成功。

转载于:https://www.cnblogs.com/gaoyuechen/p/11255854.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值