chrony时间同步服务基本应用

设置时间同步服务器

[root@use02 ~]# yum install chrony
[root@use02 ~]# vim /etc/chrony.conf
server ntp.aliyun.com iburst
allow 192.168.247.0/24
[root@use02 ~]# systemctl restart chronyd.service

查看端口,123,323

[root@use02 ~]# ss -nlu
State      Recv-Q Send-Q             Local Address:Port                            Peer Address:Port              
UNCONN     0      0                              *:123                                        *:*                  
UNCONN     0      0                      127.0.0.1:323                                        *:*                  
UNCONN     0      0                            ::1:323                                       :::* 

设置同步客户端

[root@use03 ~]# yum install chrony
[root@use03 ~]# vim /etc/chrony.conf
server 192.168.247.12 iburst
[root@use03 ~]# systemctl restart chronyd.service

在时间同步服务器上查看客户端

[root@use02 ~]# chronyc
chrony version 3.4
Copyright (C) 1997-2003, 2007, 2009-2018 Richard P. Curnow and others
chrony comes with ABSOLUTELY NO WARRANTY.  This is free software, and
you are welcome to redistribute it under certain conditions.  See the
GNU General Public License version 2 for details.

chronyc> clients
Hostname                      NTP   Drop Int IntL Last     Cmd   Drop Int  Last
===============================================================================
192.168.247.13                  9      0   4   -    13       0      0   -     -

补充

server 指定时间同步服务器
iburst 加快同步速度
allow 允许指定地址、或地址段同步
323 客户端端口,123 服务端端口


版权声明:本文为okman312原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。