python3.7——openssl升級

Python3.7使用的openssl1.0.2版本或1.1以上的版本

image.png

Centos .9安裝openssl 1.1版本

 

[root@python3_7 soft]# mkdir –p /soft

[root@python3_7 soft]# cd /soft

[root@python3_7 soft]# wget https://www.openssl.org/source/openssl-1.1.0j.tar.gz

更新zlib

[root@python3_7 soft]# yum install -y zlib

[root@python3_7 soft]# tar zxvf openssl-1.1.0j.tar.gz

image.png

[root@python3_7 soft]# cd openssl-1.1.0j

[root@python3_7 openssl-1.1.0j]# ./config shared zlib

[root@python3_7 openssl-1.1.0j]# make

[root@python3_7 openssl-1.1.0j]# make install

[root@python3_7 openssl-1.1.0j]# mv /usr/bin/openssl /usr/bin/openssl.bak

[root@python3_7 openssl-1.1.0j]# mv /usr/include/openssl /usr/include/openssl.bak

[root@python3_7 openssl-1.1.0j]# ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl

[root@python3_7 openssl-1.1.0j]# ln -s /usr/local/ssl/include/openssl /usr/include/openssl

/etc/ld.so.conf文件中寫入openssl庫文件的搜索路徑

[root@python3_7 openssl-1.1.0j]# echo "/usr/local/lib64" >> /etc/ld.so.conf

使修改後的/etc/ld.so.conf生效,

[root@python3_7 openssl-1.1.0j]# ldconfig -v

查看是否升級成功

[root@python3_7 openssl-1.1.0j]# openssl version

OpenSSL 1.1.0j  20 Nov 2018

 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章