搭建环境:VMWare+Red Hat Enterprise Linux Server release 6.5 (Santiago)+Python 2.7
推荐paramiko源码包相关下载网址:
https://github.com/paramiko/paramiko/releases
https://pypi.python.org/simple/paramiko/
1.挂载
#df -h
#mount /dev/cdrom /mnt
2.安装yum包
#yum -y install zlib-devel python-devel openssl-devel gcc
3.安装paramiko相关组件
(1)ipaddress
#tar zxvf ipaddress-1.0.19.tar.gz
#cd ipaddress-1.0.19
#python setup.py install
(2)libffi
#tar zxvf libffi-3.0.11-rc2.tar.gz
#cd libffi-3.0.11-rc2
#./configure --prefix=/usr/local/libffi
#make
#make install
#vim .bash_profile
#source .bash_profile
(3)setuptools
#tar zxvf setuptools-12.1.tar.gz
#cd setuptools-12.1
#python setup.py install
(4)enum34
#tar zxvf enum34-1.1.6.tar.gz
#cd enum34-1.1.6
#python setup.py install
(5)six
#tar zxvf six-1.11.0.tar.gz
#cd six-1.11.0
#python setup.py install
(6)idna
#tar zxvf idna-2.6.tar.gz
#cd idna-2.6
#python setup.py install
(7)pycparser
#tar zxvf pycparser-2.17.tar.gz
#cd pycparser-2.17
#python setup.py install
(8)cffi
#tar zxvf cffi-1.11.0.tar.gz
#cd cffi-1.11.0
#python setup.py install
若是 python3.3, 则:
若是 python2.7, 则:
(9) cryptography
# tar zxvf cryptography-1.3.2.tar.gz
#cd cryptography-1.3.2
#python setup.py install
4.paramiko安装
#tar zxvf paramiko-2.1.2.tar.gz
#cd paramiko-2.1.2
#python setup.py install
5.fabric安装 (附上fabric安装方法,建立在paramiko已安装的基础上)
#tar zxvf Fabric-1.14.0.tar.gz
#cd Fabric-1.14.0
#python setup.py install
6. 验证
如果能够导入成功,则说明 paramiko 安装成功,建议使用 python2.7
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31541436/viewspace-2155911/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31541436/viewspace-2155911/