其它节点服务器¶
其他节点会连接控制节点同步时间。在所有其他节点执行这些步骤。
安装并配置组件¶
安装软件包。
适用于 Ubuntu:
# apt install chrony
For RHEL or CentOS Stream:
# dnf install chrony
Configure the
chrony.conf
file and comment out or remove all but oneserver
key. Change it to reference the controller node.For RHEL or CentOS Stream, edit the
/etc/chrony.conf
file:server controller iburst
For RHEL/CentOS Stream in case of using firewalld don't forget to update firewall rules as follows:
# firewall-cmd --permanent --add-service=ntp # firewall-cmd --reload
如果是Ubuntu, 编辑
/etc/chrony/chrony.conf
文件:server controller iburst
注释掉``pool 2.debian.pool.ntp.org offline iburst``这行
重启NTP服务
适用于 Ubuntu:
# service chrony restart
For RHEL or CentOS Stream:
# systemctl enable chronyd.service # systemctl start chronyd.service