网站首页 > linux 正文

centos7升级openssl.1.1

admin 2024-01-01 08:00:00 linux 101 ℃
正文

centos7升级openssl.1.1


yum install wget vim -y

yum -y update

yum -y install yum-utils;yum -y groupinstall development

yum -y install zlib-devel bzip2-devel openssl-devel openssl-static ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel lzma gcc


openssl version查看是否1.1.1

wget --no-check-certificate   https://www.openssl.org/source/openssl-1.1.1w.tar.gz

tar -zxvf openssl-1.1.1w.tar.gz

cd openssl-1.1.1w

./config --prefix=/usr/local/openssl

make && make install


mv /usr/bin/openssl /usr/bin/oldopenssl

ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl

ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/lib64/

ln -s /usr/local/openssl/lib/libcrypto.so.1.1  /usr/lib64/

openssl version


1.1.1安装后另外一个帖子操作

mv /usr/bin/openssl /usr/bin/openssl.old

mv /usr/lib64/openssl /usr/lib64/openssl.old

mv /usr/lib64/libssl.so /usr/lib64/libssl.so.old

ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl

ln -s /usr/local/openssl/include/openssl /usr/include/openssl

ln -s /usr/local/openssl/lib/libssl.so /usr/lib64/libssl.so

echo "/usr/local/openssl/lib" >> /etc/ld.so.conf

ldconfig -v 

openssl version


如果是python还是旧版本的openssl需要重新安装编译

./configure prefix=/usr/local/python3 -with-openssl=/usr/local/openssl

make && make install


本文TAG:

蓝色枫叶