没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
OpenStack-train 版安装手册
1. OpenStack 安装
1.1. 环境介绍
OpenStack 版本
Train
操作系统
CentOS
7 =< 版本 < 8
Controller Node(控制节点)
192.168.0.11
网卡 > =2
Compute Node(计算节点)
192.168.0.31、192.168.0.32
网卡 > =2
Block Storage Node(块存储节
点)
192.168.0.11
可以复用控制节点。使用
lvm 作为存储卷需要 1 个空
硬盘,使用 NFS 不需要空硬
盘。
Object Storage Node(对象存
储节点)
192.168.0.31、192.168.0.32
可以复用计算节点,空硬盘
> =2
注:
A)Block Storage Node(块存储节点)复用控制节点其采用 lvm 作为存储卷,则控制节点需
要 1 个空硬盘。
B)Object Storage Node(对象存储节点)复用计算节点,则计算节点需要 2 个空硬盘。
C)使用 VMware 虚拟机配置参考章节《2.1.WMware 虚拟机最低配置》。
D)VMware 添加网卡参考章节《2.2.WMware 添加网卡》。
E)VMware 添加硬盘参考章节《2.3.WMware 添加硬盘》。
1.2. 基础环境安装
以下步骤无特殊指定则所有节点都需要进行操作,详细说明参考官网:
https://docs.openstack.org/install-guide/common/conventions.html
1.2.1. 修改各节点的主机名
Controller Node:
# hostnamectl set-hostname controller
Compute Node1:
# hostnamectl set-hostname compute1
Compute Node2:
# hostnamectl set-hostname compute2
1.2.2. 修改各节点的 hosts 文件
# cat >> /etc/hosts << EOF
192.168.0.11 controller
192.168.0.31 compute1
192.168.0.32 compute2
EOF
1.2.3. 修改各节点的内核参数
# cat >> /etc/sysctl.conf << EOF
net.ipv4.ip_forward = 1
net.ipv4.ip_nonlocal_bind = 1
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
EOF
# modprobe br_netfilter
# sysctl -p
注:命令`modprobe br_netfilter`报错‘modprobe: FATAL: Module br_netfilter not found.’,
原因为内核版本太低,升级内核参考章节《2.4.CentOS 升级内核》。
1.2.4. 关闭各节点的防火墙和 selinux
关闭 selinux:
# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
# setenforce 0
关闭防火墙并取消开机启动
# systemctl stop firewalld
# systemctl disable firewalld
1.2.5. 安装 NPT(时间同步)
所有节点安装:
# yum install chrony -y
Controller Node 修改配置文件:
# vi /etc/chrony.conf
修改时间服务器以及自身接受同步的网段:
其他节点修改配置文件:
# vi /etc/chrony.conf
修改时间服务器:
所有节点设置开机启动并启动服务:
# systemctl enable chronyd.service
# systemctl restart chronyd.service
验证:
# chronyc sources
注:
A) 节点不多可以全部使用公网时间服务器
B) 公司网络与公网时间服务器同步失败
1.2.6. 安装 OpenStack 基础服务包
安装:
# yum install centos-release-openstack-train -y
# yum upgrade -y
# yum install python-openstackclient -y
# yum install openstack-selinux -y
1.3. 控制节点服务部署
1.3.1.安装 MariaDB(数据库)
安装:
# yum install mariadb mariadb-server python2-PyMySQL -y
数据库配置:
# cat >> /etc/my.cnf.d/openstack.cnf << EOF
[mysqld]
bind-address = 192.168.0.11
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
EOF
设置开机启动并启动服务:
# systemctl enable mariadb.service
# systemctl start mariadb.service
安全初始化:
# mysql_secure_installation
剩余77页未读,继续阅读
资源评论
wrpys
- 粉丝: 18
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功