编辑文件 "/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

Linux 服务器上快速配置阿里巴巴 OPSX NTP服务的更多相关文章

  1. 用PhpStrom线上连接修改linux服务器上代码配置

    为了进一步提高自己的技能水平,不久前入手了一台服务器,不贵,一年也就不到两百,因为自己对于linux机器比较生疏,命令用的有点抠脚.老需要查阅处理. 于是我选择用PhpStrom直接连接线上服务器,通 ...

  2. linux服务器上Apache配置多域名

    一, 打开httpd.conf 二 找到如下三个位置配置如下 DocumentRoot "/data" #以下这个配置是紧挨着的,有两个 <Directory "/ ...

  3. Linux之HugePages快速配置

    关于Linux系统的HugePages与Oracle数据库优化,可以参考熊爷之前的文章,相关概念介绍的非常清晰: Linux大内存页Oracle数据库优化 本文旨在Linux系统上快速配置HugePa ...

  4. 在Linux服务器上配置phpMyAdmin

    使用php和mysql开发网站的话,phpmyadmin是一个非常友好的mysql管理工具,并且免费开源,国内很多虚拟主机都自带这样的管理工具,配置很简单,接下来在linux服务器上配置phpmyad ...

  5. PHP网站在Linux服务器上面的安全配置

    本文详细总结了PHP网站在Linux服务器上面的安全配置,包含PHP安全.mysql数据库安全.web服务器安全.木马查杀和防范等,很好很强大很安全. PHP安全配置 1. 确保运行php的用户为一般 ...

  6. 本地Linux服务器上配置Git

    当我们需要拉取远程服务器代码到本地服务器时,我们首先要确定已经配置了正确的Git账号,可以从~/.gitconfig文件(为隐藏文件,需要使用ls -a查看),以及~/.ssh下的id_rsa.pub ...

  7. linux服务器上配置多个svn仓库

    linux服务器上配置多个svn仓库 1.在指定目录建立仓库保存总目录,本文示例目录设定为:/usr/local/svn/svnrepos # mkdir -p /usr/local/svn/svnr ...

  8. Linux 服务器上Redis安装和配置

    1.下载安装redis 在Linux服务器上,命令行执行以下命令(cd ./usr local/src 一般源码放在这里(推荐源码安装)) wget http://download.redis.io/ ...

  9. 向linux服务器上传下载文件方式收集

    向linux服务器上传下载文件方式收集 1. scp [优点]简单方便,安全可靠:支持限速参数[缺点]不支持排除目录[用法] scp就是secure copy,是用来进行远程文件拷贝的.数据传输使用 ...

随机推荐

  1. 洛谷 P3302 [SDOI2013]森林

    ->题目链接 题解: #include<queue> #include<cstdio> #include<cstring> #include<iostr ...

  2. scala学习——(1)scala基础(上)

    scala> val x = 1 x: Int = 1 一.值与变量 值(val):赋值后不可变 val值名称:类型 = XXX 变量(var):赋值后可以改变  var变量名称:类型 = XX ...

  3. 软件测试_测试工具_APP测试工具_对比

    以下是我自己整理的APP测试工具对比,各个工具相关并不全面.尤其关于收费一项,我只是针对自己公司的实际情况进行对比的,每个工具还有其他收费套餐可以选择,详情可进入相关官网进行查看 以下是部分官网链接: ...

  4. Dictionary 对象

    Dictionary 对象 对象的存储数据键/项对. 语法 Scripting.Dictionary 说明 Dictionary对象相当于 PERL 关联数组. 项目,可以是任何形式的数据,存储在数组 ...

  5. cadence allegro 封装原点修改

    打开 dra文件后 在菜单栏 setup - change drawing origin 在命令栏输入 新的参考点位置 如想更改新坐标位置为 1,2 .输入  x 1 2

  6. 冒泡排序算法的C++,Java和Python实现和冒泡排序算法三种语言效率的比较

    冒泡排序原理: 这一篇百度经验讲得很好,我不多说了 https://jingyan.baidu.com/article/6525d4b13f920bac7d2e9484.html 他讲的是C语言,没有 ...

  7. tcp ,http .udp

    三次握手,四次挥手要知道,记住. 计算机协议常见面试题,学会了,记住.会运用.

  8. 贪心Crossing river

    英文题目: A group of N people wishes to go across a river with only one boat, which can at most carry tw ...

  9. 作业 20181204-4 互评Final版本

    此作业要求参见:[https://edu.cnblogs.com/campus/nenu/2018fall/homework/2478] 组名:可以低头,但没必要 组长:付佳 组员:张俊余 李文涛 孙 ...

  10. 《Linux内核设计与实现》第18章读书整理

    第十八章.调试 18.1 准备开始 如果bug能重现的话,将会有很大的帮助. 18.2 内核中的bug Bug多种多样,产生的原因可以有无数的原因,表象也变化多端. 从隐藏在源代码中的错误到展现在目击 ...