Linux7.1 離線安裝paramiko
環境:redhat7.1 系統自帶python 2.7.5 無外網
1.安裝gcc 和 python-devel
yum -y install gcc python-devel
2.安裝pip與setuptools
pip可以不限制版本,但setuptools最好用18.5
倆包解壓縮後進入目錄,執行
3.安裝pycrypto
下載地址
https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
安裝方式依然是解壓縮,執行python setup.py install(後面不再敖述)
4.安裝six-1.4.1.tar.gz,cffi-1.11.5-cp27-cp27mu-manylinux1_x86_64.whl
下載地址
https://pypi.org/project/cffi/#files
whl格式安裝方式用pip,執行
5.安裝PyNaCl
下載地址
https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz#sha256=0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c
6.安裝cryptography
先安裝 openssl-devel系統自帶的有,用yum就好
然後安裝依賴包 ipaddress-1.0.22 ;enum34 ;idna>=2.1 ;asn1crypto>=0.21.0 需要先行安裝,此處就是為何要安裝setuptools 18.5了,因為最新的40.5不識別.
下載地址依次是:
https://files.pythonhosted.org/packages/fc/d0/7fc3a811e011d4b388be48a0e381db8d990042df54aa4ef4599a31d39853/ipaddress-1.0.22-py2.py3-none-any.whl#sha256=64b28eec5e78e7510698f6d4da08800a5c575caa4a286c93d651c5d3ff7b6794
https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl#sha256=2f1adbb7546ed199e3c90ef23ec95c5cf3585bac7d11fb7eb562a3fe89c64e87
至此,可以安裝cryptography了
下載地址
https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz#sha256=8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6
7.安裝bcrypt
下載地址
https://files.pythonhosted.org/packages/2e/5a/2abeae20ce294fe6bf63da0e0b5a885c788e1360bbd124edcc0429678a59/bcrypt-3.1.4-cp27-cp27mu-manylinux1_x86_64.whl#sha256=2788c32673a2ad0062bea850ab73cffc0dba874db10d7a3682b6f2f280553f20
8.安裝pyasn1
下載地址
https://pypi.org/project/pyasn1/#files
finally,準備工作都已做完,可以安裝paramiko了
下載地址
https://pypi.org/project/paramiko/#files
``