Centos7 升级稳定版 openssl
openssl 官网:https://www.openssl.org
openssl 源码包:https://www.openssl.org/source/
yum install gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel
wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
tar -xf openssl-1.1.1g.tar.gz
cd openssl-1.1.1g/
./config --prefix=/usr/local/openssl
make -j 4 && make install
# 更新到系统层
mv /usr/bin/openssl /usr/bin/openssl.old
mv /usr/include/openssl /usr/include/openssl.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/local/lib64/libssl.so
ln -s /usr/local/openssl/lib/libcrypto.so /usr/local/lib64/libcrypto.so
# 检查更新后的openssl依赖库是否是1.1.1g
strings /usr/local/lib64/libssl.so | grep OpenSSL
# 显示结果表明已升级到最新版本链接库
OpenSSL 1.1.1g 21 Apr 2020
# 配置openssl库文件的搜索路径
echo '/usr/local/openssl/lib' >> /etc/ld.so.conf
# 使修改后的搜索路径生效
ldconfig -v
# 查看openssl版本,结果显示升级成功
openssl version
OpenSSL 1.1.1g 21 Apr 2020
不断学习