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
    ===============================================================================

  • 相关阅读:
    CSS的水平居中和垂直居中解决方案
    如何组织CSS?
    关于前端工程师一定要做的6件事和自己的感悟
    让透明div里的文字不透明
    利用css3的多背景图属性实现幻灯片切换效果
    CSS响应式布局到底是什么?
    整站快速变黑白灰的方法
    分析一下jquery中的ajax操作
    什么是jquery中的事件委派?
    关于checkbox的一些jquery操作
  • 原文地址:https://www.cnblogs.com/ipanel/p/10973816.html
Copyright © 2011-2022 走看看