1、下载解压openssl
wget https://www.openssl.org/source/openssl-1.1.1c.tar.gz
tar -zxvf openssl-1.1.1c.tar.gz
2、进入openssl并编译
cd openssl-1.1.1c
./config no-shared --libdir=lib
make
make install_sw
3、执行以下命令
mv /usr/bin/openssl /usr/bin/openssl.bak
mv /usr/include/openssl /usr/include/openssl.bak
ln -s /usr/local/bin/openssl /usr/bin/openssl
ln -s /usr/local/include/openssl /usr/include/openssl
echo “/usr/local/lib64” >> /etc/ld.so.conf
ldconfig -v
4、安装完成,查看安装结果
openssl version