openstack-allinone
主機準(zhǔn)備
操作系統(tǒng) | 資源配額 | 主機名 | IP地址 | 虛擬機軟件 |
---|---|---|---|---|
centos7.7 | 4CPU - 8G內(nèi)存 - 50G硬盤 | openstack.alione.local | 10.0.8.10 | VMware15.5 |
操作系統(tǒng)需要centos7.7純凈版依疼,最好不要有其他廠商定制劝枣。
修改網(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
如果沒網(wǎng)使用命令
nmcli c reload; sleep 3; nmcli c up eth0
修改主機名
hostnamectl set-hostname openstack.alione.local bash
配置hosts解析
vi /etc/hosts 10.0.8.10 openstack openstack.alione.local
配置本機免密
生成密鑰
ssh-keygen
對本機進行免密
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后可開啟
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)升級
yum -y update reboot
安裝OpenStack的yum倉庫
yum install centos-release-openstack-train -y
修改openstack倉庫repo文件
因為對網(wǎng)絡(luò)需求大袋毙,當(dāng)出現(xiàn)網(wǎng)絡(luò)波動時會導(dǎo)致報錯,最好修改為國內(nèi)源進行部署
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听盖、如下圖:安裝完成后會顯示web登陸地址,賬號密碼在:keystonerc_admin這個文件夾中生闲。
image.png
2媳溺、登陸web頁面后:頁面比較簡單
image.png