安装软件包
dnf install -y chrony配置服务文件
vi /etc/chrony.conf样例配置如下:
# Please consider joining the pool (https://www.pool.ntp.org/join.html).
<NolebasePageProperties />
pool 2.centos.pool.ntp.org iburst
# Allow NTP client access from local network.
allow 192.168.159./24重启服务
systemctl restart chronyd放行防火墙
firewall-cmd --add-service=ntp --permanent
firewall-cmd --reload配置客户端
安装软件包
dnf install -y chrony配置服务文件
vi /etc/chrony.conf样例配置如下: 这里使用了泛域名解析,如果不希望配置泛域名解析/etc/hosts直接输入IP地址
pool node01 iburst重启服务
systemctl restart chronyd