标签:
以root用户进行部署,python源也可以使用 http://mirrors.aliyun.com/pypi/simple/
修改系统
更改SElinux的配置文件 /etc/selinux/config,SELINUX=disabled
ssh-keygen
~/.ssh/authorized_keys 写入 id_rsa.pub
安装Python 2.7.9
yum -y update
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
tar zxvf Python-2.7.9.tgz
./configure
make install
安装pip
wget https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py
easy_install -i http://pypi.douban.com/simple pip
配置默认 pip 源
vim ~/.pip/pip.conf
[global]
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com
设置虚拟目录
#pip install requests[security]
pip install virtualenv
virtualenv .env
source .env/bin/activate
部署代码
git clone horizon.git
安装 Horizon需要的python packages
yum -y install python-devel
yum -y install libffi-devel
pip install –r requirements.txt
测试 Horizon启动
cd horizon
./manage.py runserver
标签:
原文地址:http://www.cnblogs.com/openqt/p/4872543.html