Centos7升级openssl

升级openssl

1.下载最新版openssl

https://www.openssl.org/source/openssl-1.1.1-pre8.tar.gz

2.编译安装

cd openssl-1.1.1-pre8
./config --prefix=/usr/local/openssl no-zlib #不需要zlib
make
make install

3.备份原配置

[root@s2-hadoop-test ~]# mv /usr/bin/openssl /usr/bin/openssl.bak

[root@s2-hadoop-test ~]

# mv /usr/include/openssl/ /usr/include/openssl.bak

4.新版配置

#将安装好的openssl 的openssl命令软连到/usr/bin/openssl

[root@s2-hadoop-test ~]

# ln -s /usr/local/openssl/include/openssl /usr/include/openssl#软链到升级后的libssl.so

[root@s2-hadoop-test ~]

# ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/local/lib64/libssl.so#将安装好的openssl命令软连到/usr/bin/openssl ln –s /usr/local/openssl/bin/openssl /usr/bin/openssl

5.修改系统配置

#写入openssl库文件的搜索路径
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
#使修改后的/etc/ld.so.conf生效 
ldconfig -v

6.查看openssl版本

openssl version
OpenSSL 1.1.1-pre8 (beta) 20 Jun 2018

重新安装python

注意:需要指定openssl的安装路径,--with-openssl

./configure --prefix=/usr/local/python37 --with-openssl=/usr/local/openssl
make
make install
分享到:

0 条评论

昵称

沙发空缺中,还不快抢~