zoukankan      html  css  js  c++  java
  • 【Linux】【Services】【SaaS】Docker+kubernetes(2. 配置NTP服务chrony)

    1. 简介

    1.1. 这次使用另外一个轻量级的NTP服务,chrony。这是openstack推荐使用的ntp服务。

    1.2. 官方网站:https://chrony.tuxfamily.org/

    2. 环境

    2.1. chrony:3.1-2.el7

    3. 安装

    3.1. 在所有机器上安装chrony

    yum install chrony

    4. 配置

    4.1. 在10.30.2.81/82上配置服务端,/etc/chrony.conf

    # Allow NTP client access from local network.
    allow 172.16.0.0/24

    4.2. 在其他机器上配置客户端,/etc/chrony.con

    server 172.16.0.81 iburst
    server 172.16.0.82 iburst

    如果使用ansible机器,也可以使用命令替换

    sed -e '3,6s/^/#/g' -e '7iserver 172.16.0.81 iburst
    server 172.16.0.82 iburst' /etc/chrony.conf

    4.3. 启动服务,并设置开机启动

    systemctl start chronyd && systemctl enable chronyd

    4.4. 测试下连通性

    [root@hctjosinfra01 named]# chronyc sources
    210 Number of sources = 4
    MS Name/IP address         Stratum Poll Reach LastRx Last sample               
    ===============================================================================
    ^- ntp1.ams1.nl.leaseweb.net     2  10   377   237   +484us[ +484us] +/-  279ms
    ^* news.neu.edu.cn               2  10   377   69m    -99us[ -113us] +/- 8995us
    ^- 85.254.217.235                2  10   337   274    +18ms[  +18ms] +/-  221ms
    ^- ntp7.flashdance.cx            2  10   377   680  +1681us[+1681us] +/-  151ms
    [root@hctjosetcd01 ~]# chronyc sources
    210 Number of sources = 2
    MS Name/IP address         Stratum Poll Reach LastRx Last sample               
    ===============================================================================
    ^- 172.16.0.81                   3   6    17    14   +219us[ +219us] +/-   12ms
    ^* 172.16.0.82                   3   6    17    15   +773ns[  -47us] +/- 9668us
  • 相关阅读:
    hmset
    java 调用mongo 判断大于等于 并且小约等于<=
    Maven项目,别人的没问题,自己机器一直有问题
    linux 时间datetimectl 问题
    真正手把手教 git
    0324-SQLMAP使用参数备注
    安全推荐网址:
    JavaScript Base64 作为文件上传的实例代码解析
    学习笔记|变量的解构赋值
    学习笔记|let 和 const 命令
  • 原文地址:https://www.cnblogs.com/demonzk/p/8191713.html
Copyright © 2011-2022 走看看