centos 7 时间同步使用的是chrony工具

1、检测chrony包是否安装

[root@martin ~]# rpm -qa|grep chrony

2、安装chrony

[root@martin ~]# yum install chrony -y

3、启动chrony并查看其状态

[root@martin ~]# systemctl start chronyd
[root@martin ~]# systemctl status chronyd

4、查看系统时间

[root@martin ~]# timedatectl
Local time: Mon 2018-05-14 09:55:13 CST
Universal time: Mon 2018-05-14 01:55:13 UTC
RTC time: Mon 2018-05-14 01:55:14
Time zone: Asia/Shanghai (CST, +0800)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a timedatectl        status      显示当前时间信息
                  set-time     设定当前时间
                  set-timezone  设定当前时区(Asia/Shanghai)
                  set-local-rtc 设定bios时间
5、设置亚洲时区
timedatectl set-timezone Asia/Shanghai
6、启用NTP同步
timedatectl set-ntp yes

7、同步时间

[root@martin ~]# chronyc makestep
200 OK

8、查看时间同步的信息来源

[root@localhost ~]# chronyc sources
Number of sources =
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^+ 119.79--.customer.l> -10ms[ -10ms] +/- 210ms
^+ makaki.miuku.net -8951us[-8951us] +/- 210ms
^+ cn.ntp.faelix.net -8692us[-8692us] +/- 111ms
^* ntp7.flashdance.cx +40ms[ +13ms] +/- 188ms

9、Chrony的配置文件在/etc/chrony.conf

server ntp1.aliyun.com
server time1.aliyun.com

CentOS 7 时间同步方法的更多相关文章

  1. centos时间同步方法

    centos时间同步方法 电脑软硬件应用网 45IT.COM 时间:2012-12-08 18:09 作者:李本清 新装的服务器可能设置了错误的,需要调整时区并调整时间.如下是使用NTP来从一个时间服 ...

  2. CentOS同步时间

    用date查看系统当前时间,date -R 可查看时区. CentOS 同步时间由ntp服务提供,可以用"yum install ntp -y"安装. 装完后运行命令 ntpdat ...

  3. Centos 修改时间地区及NTP同步北京时间

    在我们使用CentOS系统的时候,也许时区经常会出现问题,有时候改完之后还是会出错,下面我们就来学习一种方法来改变这个状况.如果没有安装,而你使用的是 CentOS系统 那使用命令 yum insta ...

  4. CentOS 同步时间

    来源:http://www.ctusky.com/16/0497/ 用date查看系统当前时间,date -R 可查看时区. CentOS 同步时间由ntp服务提供,可以用"yum inst ...

  5. centos 修改时间 计划任务

    centos 修改时间 计划任务 一,系统时间修改   1 远程连接到centos 或者直接登录系统 #date 查看系统时间 如下图所示 2 #date -s 修改时间 看下面的例子#date -s ...

  6. centos 系统时间设置

    在我们使用CentOS系统的时候,也许时区经常会出现问题,有时候改完之后还是会出错,下面我们就来学习一种方法来改变这个状况.如果没有安装,而你使用的是 CentOS系统 那使用命令 yum insta ...

  7. 解决CentOS 6环境时区、日期、时间同步方法

    有些时候我们在选择的VPS服务商提供的VPS主机方案安装系统.安装建站环境之后就直接上马网站,但是我们会有发现发布的文章或者有些时候设置的自动执行脚本时间与我们实际的时间不符合.甚至有些程序是需要与本 ...

  8. 修改CentOS服务器时间为北京时间

    购买了VPS,CentOS系统,发现服务器时间与北京时间往往不一致,存在时差. [clive@server workspace]$ date 2018年 05月 30日 星期三 02:02:47 UT ...

  9. CentOS 7 时间, 日期设置 (含时间同步)

    from http://blog.itnmg.net/centos-7-time-date/ yum install ntp //安装ntp服务systemctl enable ntpd //开机启动 ...

随机推荐

  1. Win7,Vista UAC下应用程序标注为“需要管理员权限”的四种方法(可以修改注册表)

    [转]Vista UAC下应用程序标注为“需要管理员权限”的四种方法 在Microsoft 的UACBlog里对此有过叙述.总结如下: 首先,如果一个程序被识别为管理员程序时,Vista会在它的图标上 ...

  2. 分布式缓存技术PK:选择Redis还是Memcached?

    作者:田京昆(腾讯后台研发工程师) 来源:腾云阁(https://www.qcloud.com/community/article/129) Memcached和Redis,作为近些年最常用的缓存服务 ...

  3. 绝对和相对误差(absolute & relative error)

    1. 标量 真实值为 x,测量值为 x0, 绝对误差(absolute error):Δx=x0−x(有单位): 相对误差(relative error):δx=Δxx=x0−xx=x0x−1(是一个 ...

  4. WPF中桌面屏保的制作(主要代码)

    原文:WPF中桌面屏保的制作(主要代码) 制作要点:(1) 使用System.Windows.Threading.DispatcherTimer;(2) 将Window属性设置为:      this ...

  5. Windows Presentation Foundation (WPF)中的命令(Commands)简述

    原文:Windows Presentation Foundation (WPF)中的命令(Commands)简述 ------------------------------------------- ...

  6. CSRF 专题

    一.CSRF是什么? CSRF(Cross-site request forgery),中文名称:跨站请求伪造.      也被称为:one click attack/session riding(一 ...

  7. ASP.NET Core 视图 - ASP.NET Core 基础教程 - 简单教程,简单编程

    原文:ASP.NET Core 视图 - ASP.NET Core 基础教程 - 简单教程,简单编程 ASP.NET Core 视图 花了几章节,终于把 ASP.NET Core MVC 中的 C 控 ...

  8. WPF Clip实现百叶窗

    原文:WPF Clip实现百叶窗 效果图; 后台代码: public MainWindow()         {             InitializeComponent();         ...

  9. VCL to UniGUI Migration Wizard

    Free Evaluation Edition of The Automatic Migration Scripting Wizard For Converting Legacy Delphi Cod ...

  10. Matlab Tricks(二十四)—— 将一副图像逆时针旋转 180°

    function I2 = rot180(I) I2 = I(end:-1:1, end:-1:1); % 上下颠倒,左右颠倒: