二、集群基础环境设置

目录

 

一、ip地址规划

二、设置网卡

三、关闭防火墙

四、设置是同步

五、设置免密通信

六、设置hostname以及hosts

七、设置yum


一、ip地址规划

192.168.27.138 controller02
192.168.27.139 controller02
192.168.27.140 compute1
192.168.27.141 controller(vip)

二、设置网卡

    管理网卡设置为静态地址,业务网卡设置为none,所有节点都需要配置。

三、关闭防火墙

    测试环境要关闭防火墙、网络管理器以及selinux,这样就不用通过策略方通一些端口等,在所有节点执行

systemctl stop firewalld.service
systemctl disable firewalld.service

setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config

systemctl stop NetworkManager.service
systemctl disable NetworkManager.service

四、设置是同步

    所有节点执行,以其中的一台服务器时间为表中,或者搭建一台时间服务器均可,集群中的节点都同步该时间服务器的时间。

echo 'server 10.27.24.20 iburst
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
allow 10.27.0.0/16
local stratum 10
logdir /var/log/chrony'>/etc/chrony.conf

#启动服务
systemctl enable chronyd
systemctl restart chronyd

五、设置免密通信

    各台主机之间都要设置免密通信,所有的节点都需要进行免密通信。

#以controller01为例
ssh-keygen -t rsa -P '' -f ~/.ssh/id_dsa
ssh-copy-id -i ~/.ssh/id_dsa.pub root@controller02

六、设置hostname以及hosts

    所有节点设置。

七、设置yum

    所有节点设置

[base]
name=base
baseurl=http://10.27.31.50/centos7
gpgcheck=0
gpgkey=http://10.27.31.50/centos7
enabled=1
 
[base1]
name=base1
baseurl=http://10.27.31.50/extras
gpgcheck=0
gpgkey=http://10.27.31.50/extras
enabled=1
 
[base2]
name=base2
baseurl=http://10.27.31.50/openstack-pike
gpgcheck=0
gpgkey=http://10.27.31.50/openstack-pike
enabled=1
 
[base3]
name=base3
baseurl=http://10.27.31.50/kvm-common
gpgcheck=0
gpgkey=http://10.27.31.50/kvm-common
enabled=1

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值