This host can't access internet directly, but I built a tinyproxy server on 10.21.3.31:8888. So on this host I setup a HTTPS proxy:
# export https_proxy=http://10.21.3.31:8888
# export http_proxy=http://10.21.3.31:8888
Then pip can use this proxy to install fabric.
The following installation process is based on How to install Python 2.7 and Python 3.3 on CentOS 6
-
yum groupinstall development
-
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
-
Download Python 2.7.6 source code tarball from http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
-
tar xf Python-2.7.6.tar.xz
-
cd Python-2.7.6
-
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
-
make && make altinstall
-
Verify:
which python2.7
-
Download setuptools-3.4.3.zip from https://pypi.python.org/pypi/setuptools
-
unzip setuptools-3.4.3.zip
-
cd setuptools-3.4.3
-
python2.7 setup.py install
-
Download pip-1.5.4.tar.gz from https://pypi.python.org/pypi/pip
-
tar zxvf pip-1.5.4.tar.gz
-
cd pip-1.5.4
-
python2.7 setup.py install
-
Verify:
which pip2.7
; -
pip2.7 install fabric
If it doesn't work, download Fabric-1.8.3.tar.gz, paramiko-1.12.3.tar.gz and pycrypto-2.6.1.tar.gz on PYPI, the install them locally:
# pip2.7 install pycrypto-2.6.1.tar.gz
# pip2.7 install paramiko-1.12.3.tar.gz
# pip2.7 install Fabric-1.8.3.tar.gz
- Verify:
fab --version
;
Bingo!