openstack-allinone
主機(jī)準(zhǔn)備
| 操作系統(tǒng) | 資源配額 | 主機(jī)名 | IP地址 | 虛擬機(jī)軟件 |
|---|---|---|---|---|
| centos7.7 | 4CPU - 8G內(nèi)存 - 50G硬盤(pán) | openstack.alione.local | 10.0.8.10 | VMware15.5 |
操作系統(tǒng)需要centos7.7純凈版,最好不要有其他廠(chǎng)商定制。
修改網(wǎng)絡(luò)配置文件
注:如果有多余的刪除即可
cat /etc/sysconfig/network-scripts/ifcfg-eth0 TYPE=Ethernet BOOTPROTO=static NAME=eth0 DEVICE=eth0 ONBOOT=yes IPADDR=10.0.8.10 NETMASK=255.255.248.0 GATEWAY=10.0.0.254 DNS1=223.6.6.6 DNS2=114.114.114.114
重啟網(wǎng)絡(luò)
systemctl restart network
如果沒(méi)網(wǎng)使用命令
nmcli c reload; sleep 3; nmcli c up eth0
修改主機(jī)名
hostnamectl set-hostname openstack.alione.local bash
配置hosts解析
vi /etc/hosts 10.0.8.10 openstack openstack.alione.local
配置本機(jī)免密
生成密鑰
ssh-keygen
對(duì)本機(jī)進(jìn)行免密
ssh-copy-id -i /root/.ssh/id_rsa.pub root@10.0.8.10
關(guān)閉防火墻與selinux策略
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config; setenforce 0; systemctl stop firewalld; systemctl disable firewalld
關(guān)閉NetworkManager
centos7中有兩種網(wǎng)絡(luò)管理模式,避免沖突,在安裝完opensack后可開(kāi)啟
systemctl stop NetworkManager; systemctl disable NetworkManager
修改yun源
下載阿里源
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
清空并加載緩存yum源
yum clean all; yum makecache
安裝基本工具
yum install -y bash-completion vim telnet bridge-utils yum-utils bash
系統(tǒng)升級(jí)
yum -y update reboot
安裝OpenStack的yum倉(cāng)庫(kù)
yum install centos-release-openstack-train -y
修改openstack倉(cāng)庫(kù)repo文件
因?yàn)閷?duì)網(wǎng)絡(luò)需求大,當(dāng)出現(xiàn)網(wǎng)絡(luò)波動(dòng)時(shí)會(huì)導(dǎo)致報(bào)錯(cuò),最好修改為國(guó)內(nèi)源進(jìn)行部署
cd /etc/yum.repos.d cp CentOS-OpenStack-train.repo{,.bak} vim CentOS-OpenStack-train.repo baseurl=http://mirrors.aliyun.com/$contentdir/$releasever/cloud/$basearch/openstack-train/ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=cloud-openstack-train '''''' yum clean all; yum makecache
安裝packstack工具
yum install -y openstack-packstack
安裝OpenStack-allinone
packstack --allinone
二、安裝完成后步驟
1、如下圖:安裝完成后會(huì)顯示web登陸地址,賬號(hào)密碼在:keystonerc_admin這個(gè)文件夾中。

image.png
2、登陸web頁(yè)面后:頁(yè)面比較簡(jiǎn)單

image.png