OpenStack 环境配置
基础环境配置
配置项(所有节点)
主机名
hostnametcl set-hostname ct
su -
hostnametcl set-hostname c1
su -
hostnametcl set-hostname c2
su -
防火墙、核心防护
systemctl stop firewalld
systemctl disable firewalld
setenfore 0
免交互
三台节点做免交互
非对称密钥
[root@ct ~]# ssh-keygen -t rsa
[root@ct ~]# ssh-copy-id ct
[root@ct ~]# ssh-copy-id c1
[root@ct ~]# ssh-copy-id c2
配置DNS(所有节点)
[root@ct ~]# vim /etc/resolv.conf
nameserver 114.114.114.114
基础环境依赖包
yum -y install net-tools bash-completion vim gcc gcc-c++ make pcre pcre-devel expat-devel cmake bzip2 lrzsz
EXPAT C语言发开库
yum -y install centos-release-openstack-train python-openstackclient openstack-selinux openstack-utils
#OpenStack 的 train 版本仓库源安装 包,同时安装 OpenStack 客户端和 openstack-selinux 安装包
修改网卡配置
控制节点配置(ct)
vi /etc/sysconfig/network-scripts/ifcfg-eth0
修改、确认一下参数
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.112.81
NETMASK=255.255.255.0
GATEWAY=192.168.112.2
DNS1=192.168.112.2
IPV4_ROUTE_METRIC=90
vi /etc/sysconfig/network-scripts/ifcfg-eth1
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.112.11
NETMASK=255.255.255.0
#GATEWAY=192.168.112.2
systemctl restart network #重启网卡
配置Hosts
[root@ct ~]# vi /etc/hosts
192.168.112.11 ct
192.168.112.12 c1
192.168.112.13 c2