• 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

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

  • 相关阅读:
    让footer始终位于页面的最底部
    javascript拼接html代码
    vs2010 sp1安装
    jquery call 函数改变this作用域
    复选框选中提示车牌号正则表达式
    hibernate Session一级缓存 应该注意的地方
    整理的一些java中常使用jar包以及说明
    springmvc 生命周期
    struts2之constant 讲解 (转)
    装饰器模式
  • 原文地址:https://www.cnblogs.com/gaoyuechen/p/11255854.html
Copyright © 2020-2023  润新知