溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

packstack安裝openstack-stein的步驟

發(fā)布時(shí)間:2020-05-26 16:19:25 來源:億速云 閱讀:1878 作者:鴿子 欄目:云計(jì)算

在centos7中安裝開源openstack S版(openstack-stein),使用openstack-packstack工具一鍵allinone安裝,即所有組件安裝在一臺(tái)機(jī)器上。

環(huán)境信息:
筆記本:win10、4U16G、SSD硬盤、intel core i5(支持硬件虛擬化VT-x)
虛擬化軟件:VMware? Workstation 15 Player
虛擬機(jī)規(guī)格:2U8G
ISO文件:CentOS-7-x86_64-DVD-1804.iso
openstack版本:stein

安裝步驟:
一、創(chuàng)建虛擬機(jī)安裝centos7
1)在vmware workstation創(chuàng)建一臺(tái)2U8G的虛擬機(jī),通過CentOS-7-x86_64-DVD-1804.iso自動(dòng)安裝,vmware會(huì)自動(dòng)安裝一個(gè)桌面版linux,網(wǎng)絡(luò)使用vmware的nat模式(只要能上網(wǎng)就行,用于openstack安裝包)。
packstack安裝openstack-stein的步驟

二、修改為靜態(tài)IP、配置主機(jī)名、yum
1)進(jìn)入操作系統(tǒng)
packstack安裝openstack-stein的步驟

2)查看IP與網(wǎng)關(guān)
ip add
packstack安裝openstack-stein的步驟
route -n
packstack安裝openstack-stein的步驟

3)修改靜態(tài)IP并重啟網(wǎng)絡(luò)服務(wù)
vi /etc/sysconfig/network-scripts/ifcfg-ens33
修改與添加如下信息:
BOOTPROTO="static"
ONBOOT="yes"
IPADDR=192.168.222.128   #ip addr看到的IP
NETMASK=255.255.255.0    #ip addr看到的掩碼
GATEWAY=192.168.222.2    #route -n看到的網(wǎng)關(guān)
DNS1=192.168.222.1    #DNS,序號(hào)默認(rèn)從1開始
DNS2=8.8.8.8
DNS3=114.114.114.114
packstack安裝openstack-stein的步驟
systemctl restart network
systemctl status network
packstack安裝openstack-stein的步驟

4)配置主機(jī)名
hostnamectl set-hostname rong  #退出當(dāng)前shell,重新打開生效
packstack安裝openstack-stein的步驟

5)關(guān)閉防火墻、selinux
systemctl stop firewalld  #關(guān)閉防火墻
systemctl disable firewalld   #重啟后不自動(dòng)運(yùn)行
systemctl status firewalld   #查看狀態(tài)
setenforce 0   #將selinux關(guān)閉,當(dāng)前生效
vi /etc/selinux/config  #編輯selinux配置文件,永久生效
SELINUX=disabled    #將SELINUX禁用

6)關(guān)閉Networkmanager、啟用network
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network
systemctl status network

7)配置yum
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo   #下載aliyun的yum配置文件
yum clean all   #清除緩存
yum makecache  #就是把服務(wù)器的包信息下載到本地電腦緩存起來,makecache建立一個(gè)緩存,以后用install時(shí)就在緩存中搜索,提高了速度。
原先只下載了Centos-7.repo,makecache后,會(huì)多出其它.repo文件。
packstack安裝openstack-stein的步驟

8)配置pip
vim pip.conf
[global]
index-url = http://pypi.douban.com/simple/
trusted-host = pypi.douban.com

9)下載openstack的repo
yum install -y centos-release-openstack-stein
yum update -y   #更新包,如果原來的系統(tǒng)版本太老,需要等很久

三、安裝openstack
1)安裝packstack自動(dòng)化安裝工具
yum install -y openstack-packstack    #allinone安裝工具

2)執(zhí)行allinone安裝,將所有openstack的組件安裝在本虛擬機(jī)中
packstack --allinone    #在命令行執(zhí)行這條命令,使用工具安裝,根據(jù)電腦性能安裝時(shí)間有所不同,我的老筆記本安裝了1h30min。

packstack安裝openstack-stein的步驟

3)登陸openstack界面Horizon
使用admin登陸http://虛擬機(jī)IP/dashboard/
packstack安裝openstack-stein的步驟
密碼在家目錄的keystonerc_admin中獲取
packstack安裝openstack-stein的步驟

4)openstack中的查看host
packstack安裝openstack-stein的步驟

5)開始o(jì)penstack之旅
現(xiàn)在大家就可以使用界面自己玩一下了:
packstack安裝openstack-stein的步驟
也可以在命令行使用openstack命令:
source keystonerc_admin  #加載環(huán)境變量
openstack host list  #查看主機(jī)列表
openstack image list   #查看鏡像列表
openstack network list    #查看網(wǎng)絡(luò)列表
packstack安裝openstack-stein的步驟

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI