https://buildlogs.centos.org/centos/7/cloud/x86_64/
至少两台centos 7或以上系统服务器
cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.140.12 controller
192.168.140.13 computer01
说明:这个是控制节点和计算节点分开后的hosts文件,如果控制节点和计算节点在一台上,则hosts改成如下
cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.140.12 controller
#在控制节点执行
hostnamectl set-hostname controller
#在计算节点执行
hostnamectl set-hostname computer01