文章目录
OpenStack 环境配置
1、控制节点 controller
- CPU:双核双线程-CPU虚拟化开启
- 内存:8G 硬盘:300G+1024G(CEPH块存储)
- 双网卡:VM1-(局域网)192.168.100.11
- NAT:20.0.0.30
- 操作系统:Centos7.6(1810)-最小化安装
2、计算节点 compute01
- CPU:双核双线程-CPU虚拟化开启
- 内存:8G 硬盘:300G+1024G(CEPH块存储)
- 双网卡:VM1(局域网)-192.168.100.12
- NAT-20.0.0.31
- 操作系统:Centos7.6(1810)-最小化安装
3、计算节点 compute02
- CPU:双核双线程-CPU虚拟化开启
- 内存:8G 硬盘:300G+1024G(CEPH块存储)
- 双网卡:VM1(局域网)-192.168.100.13
- NAT-20.0.0.32
- 操作系统:Centos7.6(1810)-最小化安装
安装过程中的容易遗漏的步骤
1:开启虚拟化
2:更改网卡为 eth0
3:最小化安装
修改地址
第一台
- 其余两台同样操作,ip 自己设置
- 内网 192.168.100.11
- 外网 20.0.0.30
三台服务器基本操作(同步进行)
1:关闭防火墙、核心防护
[root@controller ~]# systemctl stop firewalld
[root@controller ~]# setenforce o
[root@controller ~]# systemctl disable firewalld
2:主机名映射
[root@controller ~]# vi /etc/hosts
192.168.100.11 controller
192.168.100.12 compute01
192.168.100.13 compute02
3:三台节点做免交互
- 生产密钥
[root@controller ~]# ssh-keygen -t rsa
- 密钥复制给其他节点
[root@controller ~]# ssh-copy-id 192.168.100.11
[root@controller ~]# ssh-copy-id 192.168.100.12
[root@controller ~]# ssh-copy-id 192.168.100.13
- 登录验证
[root@controller ~]# ssh root@192.168.100.12
Last login: Wed Jan 20 20:25:04 2021
[root@compute01 ~]# exit
登出
Connection to 192.168.100.12 closed.
[root@controller ~]# ssh root@192.168.100.13
Last login: Wed Jan 20 20:25:21 2021
[root@compute02 ~]# exit
登出
Connection to 192.168.100.13 closed.
4:基础环境依赖包
[root@controller ~]# yum -y install net-tools bash-completion vim gcc gcc-c++ make pcre pcre-devel expat-devel cmake bzip2
# 安装两次,防止漏装
[root@controller ~]# yum -y install centos-release-openstack-train python-openstackclient openstack-selinux openstack-utils
# 安装两次,防止漏装
5:时间同步(操作不同,关闭同步操作)
控制节点 controller
- 安装软件
[root@controller ~]# yum -y install chrony
- 修改配置文件
[root@controller ~]# vi /etc/chrony.conf
#server 0.centos.pool.ntp.org iburst # 3 注释在线时间源
#server 1.centos.pool.ntp.org iburst # 4 注释在线时间源
#server 2.centos.pool.ntp.org iburst # 5 注释在线时间源
#server 3.centos.pool.ntp.org iburst # 6 注释在线时间源
server ntp.aliyun.com iburst # 7 增加阿里云时间源
allow 192.168.100.0/24 # 26 100网段做时间同步
- 重启服务
[root@c