zoukankan      html  css  js  c++  java
  • ntp服务端和客户端配置

    #服务端(同步阿里云)

    yum  install -y  ntp
    
    ntpdate  ntp2.aliyun.com
    
    vi /etc/ntp.conf
    将默认的server注释,改为阿里云ntp服务器
    server ntp2.aliyun.com iburst
    server ntp3.aliyun.com iburst
    server ntp4.aliyun.com iburst
    
    开放客户端限制
    restrict default ignore //设置默认策略为允许任何主机进行时间同步
    restrict 0.0.0.0 mask 0.0.0.0 nomodify notrap //允许任何主机跟进行时间同步

    查看状态

      systemctl  enable  ntpd

      systemctl   start  ntpd

      ntpq  -q

      ntpstat  

    #客户端

    yum  install -y ntp
    
    ntpdate   192.168.1.100
    
    vi /etc/ntp.conf
    将默认的server注释, 改成自己的server()
    
    server  192.168.1.100       #IP的情况下
    
    server   test.baidu.com   iburst   # 域名的情况下
    
    systemctl  enable  ntpd
    
    systemctl   start  ntpd
    
    ntpq  -p
    ntpstat  
    
    ## 注意  出现 unsynchronised  time server re-startint 这是正常现象等几分钟后就好了
    螃蟹在剥我的壳,笔记本在写我,漫天的我落在枫叶上雪花上,而你在想我。 --章怀柔
  • 相关阅读:
    Nginx日志管理
    Nginx负载均衡
    Nginx 缓存
    Nginx代理服务器
    Nginx搭建 Web服务
    Nginx HTTP模块
    洛谷P1012拼数
    洛谷 P1876 开灯
    洛谷P2084 进制转化
    关于typedef的用法
  • 原文地址:https://www.cnblogs.com/lovezhr/p/14628583.html
Copyright © 2011-2022 走看看