原文:https://my.oschina.net/yysue/blog/1628733

1.安装ntpdate

yum install ntpdate -y

2.测试是否正常

ntpdate cn.ntp.org.cn

正常情况:

3.设置定时任务每天自动同步

crontab -e
* * * ntpdate cn.ntp.org.cn

NTP服务器列表

区域[zone] 域名[Domain] IP池[IP Pool]
中国[China] cn.ntp.org.cn [223.65.211.42][223.65.205.2]223.113.97.99,[202.112.29.82] [202.108.6.95] [120.25.108.11] [182.92.12.11] [115.28.122.198]
中国教育网[China-EDU] edu.ntp.org.cn [202.112.31.197][202.112.29.82][202.118.1.130]202.118.1.81
中国台湾[ChinaTaiwan] tw.ntp.org.cn [123.204.45.116] [103.18.128.60]
美国[America] us.ntp.org.cn [24.56.178.140] [216.218.254.202] [208.53.158.34] [66.228.42.59]
新加坡[Singapore] sgp.ntp.org.cn [103.11.143.248] [202.73.57.107] [128.199.134.40] [218.186.3.36] [188.166.245.58]
韩国[korea] kr.ntp.org.cn [211.233.40.78] [106.247.248.106]
德国[Germany] de.ntp.org.cn [131.188.3.220] [131.188.3.223]
日本[Japan] jp.ntp.org.cn [133.100.11.8] [106.187.100.179] [129.250.35.251]

centos自动同步服务器时间的更多相关文章

  1. Linux 自动同步服务器时间

    200 ? "200px" : this.width)!important;} --> 介绍 Linux服务器运行久时,系统时间就会存在一定的误差,本篇文章就来介绍怎样使服务 ...

  2. linux设置自动同步服务器时间

    最近遇到一个问题,由于两台服务器时间的问题,经常导致用户登录由于时间差问题而报错,再三百度,最后整理了一下修改linux定时同步的操作(本方法适用于有自己时间服务器,没有的只限于借鉴) 首先确认,我们 ...

  3. javascript小技巧:同步服务器时间、同步倒计时

    之前在网上看到有人提问,如何在页面上同步显示服务器的时间,其实实现方法有几种,可能一般人立马就想到可以使用Ajax每隔一秒去请求服务器,然后将服务器获取到时间显示在页面上,这样虽然能够实现,但存在一个 ...

  4. [Jquery 插件]活动倒计时,可同步服务器时间,倒计时格式随意设置

    活动倒计时,可同步服务器时间,倒计时格式随意设置 使用说明 /* #活动倒计时,可同步服务器时间 startTime:起始时间 endTime:结束时间 format_str:字符模板 speed:倒 ...

  5. linux下自动同步internet时间

    linux下很简单直接一句即可: ntpdate time.nist.gov ntp后面参数为internet时间服务器url或ip即可. 但是ntpdate命令需要root特权,如果做成自动运行每次 ...

  6. CentOS自动同步时间

    安装ntpdate yum install ntpdate -y 测试是否正常 ntpdate cn.ntp.org.cn # 正常情况 [root@centos7 www]# ntpdate cn. ...

  7. CentOS时钟同步服务器

    ①本地时钟服务器需要安装chrony服务,可以通过yum.rpm.源码包安装,chrony支持C/S模式 ②编辑本地时钟服务,使其指向提供标准时间服务器,例如:中国国家授时中心NTP服务器. 修改配置 ...

  8. linux通过ntpd同步服务器时间,

    ntpd得rpm包下载地址:https://pkgs.org/download/ntp 比如我得服务器版本是centos7 x86的,那选择我点击的这一个: 下拉到最下面就有安装包下载了,我选择的是二 ...

  9. html+js 在页面同步服务器时间

    将以下的代码  放置html页面中! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " ...

随机推荐

  1. The 13th Chinese Northeast Collegiate Programming Contest

    题解: solution Code: A. Apple Business #include<cstdio> #include<algorithm> #include<ve ...

  2. [LeetCode] 466. Count The Repetitions 计数重复个数

    Define S = [s,n] as the string S which consists of n connected strings s. For example, ["abc&qu ...

  3. [LeetCode] 40. Combination Sum II 组合之和之二

    Given a collection of candidate numbers (candidates) and a target number (target), find all unique c ...

  4. mysql增加字段,修改字段,增加索引等语句

    mysql语句: 1.修改表名: rename table 旧表名 to 新表名; 2.修改字段类型: alter table 表名 modify column 字段名 字段类型(长度) 3.修改字段 ...

  5. Django中render_to_response和render的区别(转载)

    转载地址:https://www.douban.com/note/278152737/ 自django1.3开始:render()方法是render_to_response的一个崭新的快捷方式,前者会 ...

  6. C# 方法递归

    一.简介 方法递归就是自己调用自己. 未完结

  7. LeetCode 561:数组拆分 I Array Partition I

    文章全部来自公众号:爱写bug 算法是一个程序的灵魂. Given an array of 2n integers, your task is to group these integers into ...

  8. vins_fusion学习笔记

    Vins-Fusion源码:https://github.com/HKUST-Aerial-Robotics/VINS-Fusion 摘要 应项目需要,侧重学习stereo+gps融合 转载几篇写的比 ...

  9. 订单1:n支付单 设计讨论

    方法一:订单1:1支付单,下单时生成1订单,并生成1支付单(这个支付单是微信需要的相关信息),设置超时时间2小时,如果订单超时,则提示用户,订单已超时,重新下单即可: 方法二:订单1:N支付单,下单时 ...

  10. C# Thread was being aborted

    先重现问题 1.新建一个aspx页面项目,插入两个页面WebForm1.aspx,WebForm2.aspx, WebForm1代码修改如下 protected void Page_Load(obje ...