centos_x64min
1.yum install net-tools
2.yum install git
后面可選-后面需要安裝distro======================
yum install wget
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install distro
============================================
3.https://github.com/openstack/devstack?下載devstack?或者直接
git clone https://github.com/openstack-dev/devstack.git 求豫,將devstack放再/home/下
4../create-stack-user.sh?創(chuàng)建用戶熄云,提示缺少lsb_release
yum install -y redhat-lsb
./create-stack-user.sh
5.chow -R stack:stack /home/devstack
6.cd /home/devstack
su - stack
./stack.sh
直接創(chuàng)建該文件:
mkdir -p /opt/stack/logs
touch /opt/stack/logs/error.log
然后繼續(xù)執(zhí)行stack.sh報錯:
stack.sh:227膨更,查看里面代碼再這塊出錯,發(fā)現(xiàn)我的本地版本比較低缴允,代碼判斷認(rèn)為不支持荚守,然后修改shell,再判斷條件里將自己打印出來的DISTRO版本放進(jìn)去
# Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``FORCE=yes ./stack``
繼續(xù)執(zhí)行仍然報錯:
./stack.sh:482:check_path_perm_sanity
/home/devstack/functions:640:die
[ERROR] /home/devstack/functions:640 Invalid path permissions
分析應(yīng)該是權(quán)限不對练般,修改shell腳本增加打哟Q:echo DEST======================================/opt/stack
切root用戶修改路徑的權(quán)限屬性
這里還是修改為777,后面會說的原因:
chmod -R 777 /opt/stack
chown -R stack:stack /opt/stack
切回stack用戶
可選================================================
如果上面640的話薄料,可能遇到這樣的錯誤:
再執(zhí)行./stack.sh?然后仍然有報錯:
stack.sh failed
Error on exit
/usr/bin/env: python3: Permission denied
看來得升級python3敞贡,但是上面有一個/home/devstack/tools/outfilter.py?沒有權(quán)限的提示,干脆直接將/opt/stack改為777得了摄职,改完重新執(zhí)行PASS了
================================================
后面遇到提示輸入密碼直接輸入密碼即可
可惜到這以為后面沒有什么問題了誊役,其實(shí)大錯特錯
0.升級python3:http://www.reibang.com/p/6b52eb4960e4
注意編譯的時候需要修改ssl配置(否則后面會提示ssl鏈接失敗):
vi /usr/local/Python-3.8.0/Modules/Setup:
SSL=/opt/openssl1.0.2r
_ssl _ssl.c \
? ? ? ? -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
? ? ? ? -L$(SSL)/lib -lssl -lcrypto
1.本地創(chuàng)建localrc文件(/home/devstack/)
localrc
ADMIN_PASSWORD=Admin123
DATABASE_PASSWORD=Admin123
RABBIT_PASSWORD=Admin123
SERVICE_PASSWORD=$ADMIN_PASSWORD
# use TryStack git mirror
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git
# only support IP v4
SERVICE_IP_VERSION=4
# Branches
KEYSTONE_BRANCH=stable/rocky
NOVA_BRANCH=stable/rocky
NEUTRON_BRANCH=stable/rocky
SWIFT_BRANCH=stable/rocky
GLANCE_BRANCH=stable/rocky
CINDER_BRANCH=stable/rocky
#這里發(fā)現(xiàn)遇到再后面下載devstack因?yàn)橹貜?fù)下載會報錯
rm -rf /home/devstack/devstack
git clone http://git.trystack.cn/openstack-dev/devstack -b stable/rocky
LOGFILE=$DEST/logs/stack.sh.log
#若禁用tempest服務(wù),則加disabled
disable_service tempest
# Enabling Neutron (network) Service
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service q-metering
enable_service neutron
LOGDAYS=2
SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
SWIFT_REPLICAS=1
SWIFT_DATA_DIR=$DEST/data
注釋shell腳本里這2步驟
再后面安裝會遇到下載python擴(kuò)展組件總會有些超時下載失敗的谷市,直接去?https://pypi.org/project/pbr/#files?上下載安裝蛔垢,下載whl包時,直接 pip3 install x.whl即可安裝
再之后提示:Error: Command '['/opt/stack/bindep-venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-p
搜索網(wǎng)上解決辦法:https://www.solves.com.cn/it/rj/czxt/linux/2019-12-19/10280.html歌懒,我用的解決辦法2:
su -?切root用戶
cd /usr/lib64/python3.6/ensurepip/
mkdir _bundled
cd?_bundled
wget?https://files.pythonhosted.org/packages/e7/16/da8cb8046149d50940c6110310983abb359bbb8cbc3539e6bef95c29428a/setuptools-40.6.2-py2.py3-none-any.whl
wget https://files.pythonhosted.org/packages/ac/95/a05b56bb975efa78d3557efa36acaf9cf5d2fd0ee0062060493687432e03/pip-9.0.3-py2.py3-none-any.whl
python3 -m ensurepip --upgrade
然后驗(yàn)證:python3 -m venv pdf_env不再報錯
接著報錯:Error: Unable to find a match: rabbitmq-server
1.安裝依賴-socat
wget –no-cache http://www.convirture.com/repos/definitions/rhel/6.x/convirt.repo -O /etc/yum.repos.d/convirt.repo
yum makecache
yum install socat
2.安裝依賴erlang
yum install -y autoconf
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel
wget http://erlang.org/download/otp_src_21.3.tar.gz
tar -xvzf otp_src_21.3.tar.gz
cd otp_src_21.3
./otp_build autoconf
echo 'export PATH=$PATH:/usr/local/lib/erlang/bin'>> /etc/profile
source /etc/profile
然后下載rabbitmq-server進(jìn)行安裝:https://www.rabbitmq.com/install-rpm.html#running-rpm
rpm -ivh --nodeps rabbitmq-server-3.7.10-1.noarch.rpm
安裝openvswitch:參考?https://www.cnblogs.com/bethal/p/6043899.html
yum install-y qemu-kvm libvirt virt-install bridge-utils
yum -y install openssl-devel wget kernel-devel
yum groupinstall "Development Tools"
mkdir -p ~/rpmbuild/SOURCES
cd?~/rpmbuild/SOURCES
wget http://openvswitch.org/releases/openvswitch-2.3.1.tar.gz
tar xfz openvswitch-2.3.1.tar.gz
sed 's/openvswitch-kmod, //g' openvswitch-2.3.1/rhel/openvswitch.spec > openvswitch-2.3.1/rhel/openvswitch_no_kmod.spec
rpmbuild -bb --without=check ~/openvswitch-2.3.1/rhel/openvswitch_no_kmod.spec
yum localinstall /root/rpmbuild/RPMS/x86_64/openvswitch-2.3.1-1.x86_64.rpm
systemctl start openvswitch.service (可能第一次卡住啦桌,stop后再執(zhí)行一次start)
之后提示:git clone http://git.trystack.cn/openstack-dev/devstack -b stable/rocky?連接不上,之前是ok的,很奇c怪甫男,只能注釋此行且改,然后將:
cd /home/devstack
cp -R backup/devstack ./
修改localrc文件:
之后提示:/home/devstack/files/etcd-v3.3.12-linux-amd64.tar.gz: FAILED
再:https://github.com/etcd-io/etcd/releases/download/v3.3.12/etcd-v3.3.12-linux-amd64.tar.gz上面下載后放到/home/devstack/files/下,重試又提示新的錯誤:
+functions-common:restart_service:2185 sudo /bin/systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
通過命令journalctl -xe查看
查看配置文件內(nèi)容:LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
應(yīng)該是沒有安裝uwsgi模塊板驳,解決辦法:
yum install epel-release
yum install mod_proxy_uwsgi uwsgi-plugin-python
驗(yàn)證成功開啟httpd服務(wù):
systemctl enable uwsgi.service
systemctl enable httpd.service
systemctl start uwsgi.service
systemctl start httpd.service