-
软件下载
wget https://www.openssl.org/source/openssl-1.1.1v.tar.gz --no-check-certificate
-
依赖安装
yum install -y gcc gcc-c++ autoconf automake zlib-devel pcre-devel
-
编译安装
tar -zxvf openssl-1.1.1v.tar.gz cd openssl-1.1.1v ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl shared zlib make && make install
-
更新系统库
echo "/usr/local/openssl/lib" > /etc/ld.so.conf.d/openssl.conf ldconfig
-
备份并软连接至新版本
mv /usr/bin/openssl /usr/bin/openssl.old ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
-
查看当前版本
openssl version