在Ubuntu14.04环境下使用Devstack搭建Openstack

本文详细介绍了如何在Ubuntu 14.04环境下部署OpenStack Icehouse版本,包括系统环境准备、安装过程、配置pip源及解决过程中可能出现的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一. 安装环境

(1) 系统环境:Ubuntu14.04
下载地址:http://www.ubuntu.com/download/desktop/
(2)openstack:icehouse

二. 安装过程

1.首先安装Ubuntu14.04操作系统并更新系统,安装git

apt-get dist-upgrade
apt-get install git

2.设置使用豆瓣pypi源

mkdir $HOME/.pip
vi $HOME/.pip/pip.conf

输入以下内容:

[global]
index-url = http://pypi.douban.com/simple/

简单的做法:

mkdir /root/.pip
cat >/root/.pip/pip.conf <<EOF
[global]
index-url = http://pypi.douban.com/simple/
EOF

3.下载代码

cd /home
git clone https://github.com/openstack-dev/devstack.git

注意:目前Devstack脚本已经不支持直接使用root身份运行,你需要创建stack用户运行

cd /home/devstack/tools/
./create-stack-user.sh

修改devstack目录权限,让stack用户可以运行

chown -R stack:stack /home/devstack

切换到stack用户下

su stack
cd /home/devstack

4.执行

./stack.sh

出现的问题

  1. pipy源链接失败解决方法:

(1)更换pip源

index-url = http://mirrors.aliyun.com/pypi/simple/ //阿里源
index-url = http://pypi.hustunique.com/  //华中理工大学
index-url = http://pypi.sdutlinux.org/  //山东理工大学
index-url = http://pypi.mirrors.ustc.edu.cn/  //中国科学技术大学

(2)手动安装
安装Devstack时提示pip源的问题,如:Download of get-pip.py failed,可以手动安装:

wget http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py
wget https://github.com/pypa/pip/raw/master/contrib/get-pip.py
sudo python get-pip.py

然后在devstack/tools目录下,找到install_pip.py,注释掉install_get_pip这个函数调用,就OK了。再执行./stack.sh

注:pip是一个安装和管理Python包的工具,是easy_install的一个替换品。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值