centos版本:centos-7-x86_64-minimal-2009
vm station版本:16
openstack版本:stein
虚拟机内存:4G或8G
虚拟机硬盘:50G以上
#开头的为命令或者注释
配置网卡
# vi /etc/sysconfig/network-scripts/ifcfg-ens33
IPADDR=192.168.100.101
GATEWAY=192.168.100.2
NETMASK=255.255.255.0
DNS1=8.8.8.8
DNS2=114.114.114.114
重启网卡
# systemctl restart network
#查看ip
# ifconfig
配置主机名
# hostnamectl set-hostname openstack
# bash
配置host解析文件
# vim /etc/hosts
192.168.100.101 openstack
验证
# more /etc/hosts
关闭防火墙
# systemctl stop firewalld
# systemctl disable firewalld
# systemctl status firewalld
关闭selinux
# setenforce 0
# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
# getenforce
permission
关闭NetworkManager
# systemctl stop NetworkManager
# systemctl disable NetworkManager
# systemctl status NetworkManager
修改源为阿里云源
# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
重建本地yum索引缓存
# yum makecache
升级所有包,系统版本和内核,改变软件设置和系统设置
# yum -y update
重启
# reboot
安装常用软件
# yum -y install vim bash-completion yum-utils
安装 OpenStack Stein版本的 yum 库
# yum -y install centos-release-openstack-stein
修改源配置文件 CentOS-OpenStack-stein.repo 配置⽂件
# cd /etc/yum.repos.d/
#备份
# cp -a CentOS-OpenStack-stein.repo CentOS-OpenStack-stein.repo.bak
#修改配置⽂件
# vim CentOS-OpenStack-stein.repo
[centos-openstack-stein]
baseurl=http://mirrors.aliyun.com/$contentdir/$releasever/cloud/$basearch/openstack-stein/
#注释以下内容
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=cloud-openstack-stein
清除本地yum索引缓存,然后再重建索引缓存
# yum clean all && yum makecache
安装packstack工具
# yum -y install openstack-packstack
安装OpenStack all-in-one模式
# packstack --allinone
需要一段时间才能配置成功
ls 可以看到root用户下的keystone认证文件,登录horizon的网址等等。