准备环境:
1)最小安装Centos 7(6G内存+50G硬盘)
2) selinux、iptables关闭
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
setenforce 0
# 使用豆瓣pip源
mkdir -p ~/.pip
vi ~/.pip/pip.conf
[global]
index-url = http://pypi.douban.com/simple/
[install]
trusted-host = pypi.douban.com
下载并安装EPEL
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm
yum repolist ##检查是否已添加至源列表
为系统安装必要的工具包:
yum install -y Python-pip
pip install --upgrade pip
pip install -U os-testr
yum -y install bridge-utils
yum -y install net-tools
yum install -y git yum-utils
更新系统
yum update
3)添加一个openstack用户
useradd -d /opt/stack -m -s /bin/bash stack
echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
4)su进入新用户并克隆devstack
su - stack
git clone https://git.openstack.org/openstack-dev/devstack
5)安装devstack
cd devstack
./stack.sh
等待2-3分钟,您将看到MySQL数据库,RabbitMQ,服务管理员,服务身份验证和Horizon和Keystone服务的密码提示。
预计剩余的安装步骤需要至少10-30分钟的长时间(具体取决于您的互联网连接。
6)安装完成后就可以访问
*************************************************************************************************
启动 OpenStack
报错问题处理:
/stack.sh: line 488: generate-subunit: command not found
sudo yum install -y Python-pip
sudo pip install --upgrade pip
sudo pip install -U os-testr