CentOS8系统同步时间

一、安装chrony

 

安装chrony
yum install -y chrony 启动 chrony systemctl start chronyd 设为系统自动启动 systemctl enable chronyd

 

二、编辑配置etc/chrony.conf

 

1 [root@zabbix ~]# cat /etc/chrony.conf
2 # Use public servers from the pool.ntp.org project.
3 # Please consider joining the pool (http://www.pool.ntp.org/join.html).
4 #pool 2.centos.pool.ntp.org iburst
5 server ntp.aliyun.com iburst
6 server cn.ntp.org.cn iburst

 三、重新加载配置并测试

 1 [root@zabbix ~]# systemctl restart chronyd.service
 2 [root@zabbix ~]# chronyc sources -v
 3 
 4   .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 5  / .- Source state '*' = current best, '+' = combined, '-' = not combined,
 6 | /             'x' = may be in error, '~' = too variable, '?' = unusable.
 7 ||                                                 .- xxxx [ yyyy ] +/- zzzz
 8 ||      Reachability register (octal) -.           |  xxxx = adjusted offset,
 9 ||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
10 ||                                \     |          |  zzzz = estimated error.
11 ||                                 |    |           \
12 MS Name/IP address         Stratum Poll Reach LastRx Last sample               
13 ===============================================================================
14 ^* 203.107.6.88                  2   6     7     1   -669us[ +144us] +/-   48ms
15 ^- 114.67.237.130                2   6     7     2  -1577us[ -764us] +/-  226ms

 

posted @ 2022-04-24 16:46  我的城市没有海  阅读(391)  评论(0)    收藏  举报