zoukankan      html  css  js  c++  java
  • OpenStack--ntp组件时间同步服务

    作用:ntp主要是用于对计算机的时间同步管理操作

    环境:

    服务端: 192.168.245.172 

    客户端: 192.168.245.171

    时间是对服务器来说是很重要的,一般很多网站都需要读取服务器时间来记录相关信息,如果时间不准,则可能造成很大的影响。

    下载

    yum -y install ntp

    编辑文件

    vim /etc/ntp.conf

    主节点:

    #restrict 127.0.0.1 (注释)
    restrict 0.0.0.0(改成所有ip)
    #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(同步本地主机)
    fudge 127.127.1.0 stratum 10

     其他节点:

    # server 3.centos.pool.ntp.org iburst(注释上述几行)
    server 192.168.245.172 iburst(同步的主机ip)

    所有节点重启 ntp 服务

    # systemctl restart ntpd

    # systemctl enable ntpd

  • 相关阅读:
    python基础语法
    DNS解析原理
    (4)获取servlet常用api
    (2)struts2配置祥解
    (1)WEB框架概念和struts2体验
    10.1--登录认证拦截器
    10--拦截器
    9--RESTful支持
    8--json交互
    7---上传图片
  • 原文地址:https://www.cnblogs.com/lwl117/p/10684514.html
Copyright © 2011-2022 走看看