chrony服务器
安装chrony yum -y install chrony
会在/etc会出现配置文件 以chrony开头
修改chrony.conf 来配置chrony服务
简易实验
服务端 centos 8 IP 192.168.10.100
客户端 win7 IP 192.168.10.101
一、在客户端安装chrony
yum -y install chrony
二、修改chrony.conf配置文件
vim /etc/chrony.comf
添加允许连接
# Allow NTP client access from local network.
#allow 192.168.0.0/16
allow 192.168.10.101/24 ###允许连接
因为服务器时间不准确所以客户端请求的时候服务端并不会传输
修改配置 即使服务端没有同步到精确的网络时间,也允许向客户端同步不精确的时间
# Serve time even if not synchronized to a time source.
local stratum 10
三、关闭防火墙 开启chrony服务
systemctl stop firewalld.service
systemctl enable chronyd
systemctl start chronyd
systemctl restart chronyd
四、测试
在win7控制面板找到日期和时间设置,点击设置时间和日期
点击Internet时间,点击更改设置,服务器输入192.168.10.100,点击立刻更新
同步成功则实验完成