Network Time Protocol (NTP)安装服务器
Centos7以上版本都会自带ntp服务,直接配置既可,若没有安装须要先安装。spa
1.安装chrony服务server
yum install chronyip
2.编辑/etc/chrony.conf文件同步
server NTP_SERVER iburst配置
将NTP_SERVER替换成适当的主机名或者IP地址service
3.编辑/etc/chrony.conf,让其它节点可以链接到控制节点的chrony控制节点。im
allow 10.0.0.0/24
将10.0.0.0/24替换成合适的ip地址
4.启动NTP服务并设置开机自启动yum
systemctl enable chronyd.service
systemctl start chronyd.service
1.安装chrony服务img
yum install chrony
2.编辑/etc/chrony.conf文件,让当前节点以controller节点为时间同步服务器
server controller iburst
3.启动NTP服务并设置开机自启动
systemctl enable chronyd.service
systemctl start chronyd.service
在Controller节点运行:chronyc sources,会看到如下相似的信息
在其它节点运行:chronyc sources,会看到controller节点存在