zoukankan      html  css  js  c++  java
  • 配置时间服务器

    1.安装chrony

    yum -y install chronyd

    2.配置文件

    cat /etc/chrony.conf
    # Use public servers from the pool.ntp.org project.
    # Please consider joining the pool (http://www.pool.ntp.org/join.html).
    server 0.rhel.pool.ntp.org iburst
    server 1.rhel.pool.ntp.org iburst
    server 2.rhel.pool.ntp.org iburst
    server 3.rhel.pool.ntp.org iburst

    server 192.168.52.200 iburst

    # Ignore stratum in source selection.
    stratumweight 0

    # Record the rate at which the system clock gains/losses time.
    driftfile /var/lib/chrony/drift

    # Enable kernel RTC synchronization.
    rtcsync

    # In first three updates step the system clock instead of slew
    # if the adjustment is larger than 10 seconds.
    makestep 10 3

    # Allow NTP client access from local network.
    #allow 192.168/16

    # Listen for commands only on localhost.
    bindcmdaddress 127.0.0.1
    bindcmdaddress ::1

    # Serve time even if not synchronized to any NTP server.
    #local stratum 10

    keyfile /etc/chrony.keys

    # Specify the key used as password for chronyc.
    commandkey 1

    # Generate command key if missing.
    generatecommandkey

    # Disable logging of client accesses.
    noclientlog

    # Send a message to syslog if a clock adjustment is larger than 0.5 seconds.
    logchange 0.5

    logdir /var/log/chrony
    #log measurements statistics tracking

    3.启动服务

    systemctl start chronyd.service //启动服务

    4.查看时间同步源

    chronyc sources -v
    210 Number of sources = 0

    .-- Source mode '^' = server, '=' = peer, '#' = local clock.
    / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
    | / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
    || .- xxxx [ yyyy ] +/- zzzz
    || / xxxx = adjusted offset,
    || Log2(Polling interval) -. | yyyy = measured offset,
    || | zzzz = estimated error.
    || | |
    MS Name/IP address Stratum Poll Reach LastRx Last sample
    ===============================================================================

  • 相关阅读:
    BZOJ 2002: [Hnoi2010]Bounce 弹飞绵羊
    算法笔记-- 二进制集合枚举子集 && 求子集和 && 求父集和
    BZOJ 1084: [SCOI2005]最大子矩阵
    BZOJ 1968: [Ahoi2005]COMMON 约数研究
    2018 German Collegiate Programming Contest (GCPC 18)
    Codeforces 1100 F
    算法笔记--极大极小搜索及alpha-beta剪枝
    2017 Russian Code Cup (RCC 17), Elimination Round D
    All You Can Code 2008 (Romanian Contest) A
    2016 Russian Code Cup (RCC 16), Final Round B
  • 原文地址:https://www.cnblogs.com/ipanel/p/10973816.html
Copyright © 2011-2022 走看看