首页 > 其他 > 详细

CentOS8系统时间同步解决方法

时间:2021-08-03 18:51:33      阅读:45      评论:0      收藏:0      [点我收藏+]

1安装工具

[root@kiccleaf home]# yum install -y chrony

Installed:
  chrony-3.5-1.el8.x86_64                                                                                            timedatex-0.5-3.el8.x86_64                                                                                           

Complete!
安装好工具,先启动
[root@kiccleaf home]# systemctl start chronyd
设为系统自动启动
[root@kiccleaf home]# systemctl enable chronyd
编辑一下配置文件
[root@kiccleaf home]# vim /etc/chrony.conf

2/etc/chrony.conf配置文件内容:

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#pool 2.centos.pool.ntp.org iburst (这一行注释掉,增加以下两行)
server ntp.aliyun.com iburst
server cn.ntp.org.cn iburst

3重新加载配置并测试:

重新加载配置
[root@kiccleaf home]# systemctl restart chronyd.service
[root@kiccleaf home]# chronyc sources -v
210 Number of sources = 2

  .-- 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
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^* 203.107.6.88                  2   6     7     2   -188us[+6871us] +/-   24ms
^- 61.177.189.190                3   6    17    19   +663us[ +663us] +/-   97ms

[root@kiccleaf home]# date
Sat Aug 29 16:26:08 CST 2020

 

CentOS8系统时间同步解决方法

原文:https://www.cnblogs.com/tyjs09/p/15095139.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!