zoukankan      html  css  js  c++  java
  • Linux 服务器上快速配置阿里巴巴 OPSX NTP服务

     

    编辑文件 "/etc/ntp.conf",根据情况修改文件内容为:

    • 互联网上的服务器:
    driftfile  /var/lib/ntp/drift
    pidfile   /var/run/ntpd.pid
    logfile /var/log/ntp.log
    restrict    default kod nomodify notrap nopeer noquery
    restrict -6 default kod nomodify notrap nopeer noquery
    restrict 127.0.0.1
    server 127.127.1.0
    fudge  127.127.1.0 stratum 10
    server ntp.aliyun.com iburst minpoll 4 maxpoll 10
    restrict ntp.aliyun.com nomodify notrap nopeer noquery
    • 阿里云 ECS 服务器:
    driftfile  /var/lib/ntp/drift
    pidfile   /var/run/ntpd.pid
    logfile /var/log/ntp.log
    restrict    default kod nomodify notrap nopeer noquery
    restrict -6 default kod nomodify notrap nopeer noquery
    restrict 127.0.0.1
    server 127.127.1.0
    fudge  127.127.1.0 stratum 10
    server ntp.aliyun.com iburst minpoll 4 maxpoll 10
    restrict ntp.aliyun.com nomodify notrap nopeer noquery
    
    server ntp1.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10
    restrict ntp1.cloud.aliyuncs.com nomodify notrap nopeer noquery
    server ntp2.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10
    restrict ntp2.cloud.aliyuncs.com nomodify notrap nopeer noquery
    server ntp3.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10
    restrict ntp3.cloud.aliyuncs.com nomodify notrap nopeer noquery
    server ntp4.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10
    restrict ntp4.cloud.aliyuncs.com nomodify notrap nopeer noquery
    server ntp5.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10
    restrict ntp5.cloud.aliyuncs.com nomodify notrap nopeer noquery
    server ntp6.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10
    restrict ntp6.cloud.aliyuncs.com nomodify notrap nopeer noquery
    • 对于使用 chrony 客户端的 linux 主机

    配置 '/etc/chrony.conf' 文件的内容为:

    server ntp.aliyun.com iburst
    stratumweight 0
    driftfile /var/lib/chrony/drift
    rtcsync
    makestep 10 3
    bindcmdaddress 127.0.0.1
    bindcmdaddress ::1
    keyfile /etc/chrony.keys
    commandkey 1
    generatecommandkey
    logchange 0.5
    logdir /var/log/chrony
  • 相关阅读:
    关于 flutter_boost splash加载动画
    [BS-23] AFN网络请求上拉/下拉刷新的细节问题总结
    [BS-22] Objective-C中nil、Nil、NULL、NSNull的区别
    [BS-21] 关于OC中对象与指针的思考
    [BS-20] 导航控制器和视图控制器在添加控制器的区别
    ios runtime swizzle
    关于C、OC、C++、OC++、Swift的一些常识
    iOS多线程知识总结--GCD
    使用代码创建AutoLayout约束
    iOS中NSLog输出格式大全
  • 原文地址:https://www.cnblogs.com/cheyunhua/p/8588414.html
Copyright © 2011-2022 走看看