各节点设置各节点配置IP与主机名解析
[root@controller1 ~]# more /etc/hosts
192.168.100.100 controller
192.168.100.181 controller1
192.168.100.182 controller2
192.168.100.183 controller3
192.168.100.184 compute1
[root@controller1 ~]#
各节点关闭相关服务与防火墙
[root@controller1 ~]# systemctl stop NetworkManager
[root@controller1 ~]# systemctl disable NetworkManager
[root@controller1 ~]# systemctl stop firewalld.service
[root@controller1 ~]# systemctl stop iptables.service
[root@controller1 ~]# setenforce 0
各节点时间同步,安装chrony并配置
控制节点:
[root@controller1 ~]# yum install chrony
[root@controller1 ~]# vim /etc/chrony.conf
server 127.0.0.1 iburst #注释其它的server
allow 192.168.100.0/24
local stratum 10
[root@controller1 ~]# service chronyd restart
其它节点:
[root@computer1 ~]# yum install chrony
server 192.168.100.181 iburst #这里填入控制节点的主机IP或主机名
server controller1 iburst
[root@computer1 ~]# service chronyd restart
验证(控制节点)
[root@controller1 ~]# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample