zoukankan      html  css  js  c++  java
  • centos7.x配置时间服务器(chrony)

    1.服务端配置

    [root@centos-151 ~]# yum install chrony
    [root@centos-151 ~]# vim /etc/chrony.conf
    # 添加如下1行
    server s1b.time.edu.cn       iburst
    # 解注释并修改如下2行
    allow 192.168.46.0/24
    local stratum 10
    [root@centos-151 ~]# systemctl restart chronyd
    [root@centos-151 ~]# netstat -tunlp |grep ch
    udp        0      0 0.0.0.0:123             0.0.0.0:*                           21886/chronyd
    udp        0      0 127.0.0.1:323           0.0.0.0:*                           21886/chronyd
    udp6       0      0 ::1:323                 :::*                                21886/chronyd
    

    2.客户端配置

    [root@centos-158 ~]# yum install chrony
    [root@centos-158 ~]# vim /etc/chrony.conf
    # 添加行
    server 192.168.46.151 iburst
    # 删除其它server 行
    
    [root@centos-158 ~]# systemctl restart chronyd
    

    3.客户端测试

    [root@centos-158 ~]# chronyc  sources  -V
    210 Number of sources = 1
    MS Name/IP address         Stratum Poll Reach LastRx Last sample
    ===============================================================================
    ^? 192.168.46.151                0   8     0     -     +0ns[   +0ns] +/-    0ns
    [root@centos-158 ~]# date
    Mon Mar  5 09:59:02 CST 2018
    

    4.window客户端配置

    在 Windows 上,您可以在 PowerShell 或命令提示符下运行以下命令:

    net stop w32time
    w32tm /config /syncfromflags:manual /manualpeerlist:"192.168.46.151"
    w32tm /config /reliable:yes
    net start w32time
    

    致谢

    时间服务器
    利用 Amazon Time Sync Service 保持时间同步

  • 相关阅读:
    网络安全协议(1)
    CG-CTF(6)
    CG-CTF(5)
    CG-CTF(4)
    CG-CTF(3)
    MAC地址欺骗(原理及实验)
    CG-CTF(2)
    CG-CTF(1)
    【转载】Spring Boot【快速入门】2019.05.19
    【编程大系】Java资源汇总
  • 原文地址:https://www.cnblogs.com/jonnyan/p/14201982.html
Copyright © 2011-2022 走看看