官网
https://www.openssl.org/
下载地址:
https://www.openssl.org/source/
1.安装依赖
yum -y install perl perl-devel gcc gcc-c++
2.下载
wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1j.tar.gz
3.解压并编译安装
tar -zxvf openssl-1.1.1j.tar.gz
cd openssl-1.1.1j.tar.gz
编译
./config --prefix=/usr/local/openssl
make && make install
备份原文件
mv /usr/bin/openssl /usr/bin/openssl.bak
创建软链接
ln -sf /usr/local/openssl/bin/openssl /usr/bin/openssl
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
ldconfig -v # 设置生效