升级 openssl 环境至 openssl-1.0.2j

1、查看源版本

1
2
[root@~]# openssl version -a
OpenSSL 1.0.1g

2、下载 openssl-1.0.2j.tar.gz

1
wget https://www.openssl.org/source/openssl-1.0.2j.tar.gz

3、更新 zlib

1
yum install -y zlib

4、解压安装

1
2
3
4
5
6
7
8
9
10
11
tar zxf openssl-1.0.2j.tar.gz
cd openssl-1.0.2j
./config shared zlib
make
make install
mv /usr/bin/openssl /usr/bin/openssl.bak
mv /usr/include/openssl /usr/include/openssl.bak
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
echo “/usr/local/ssl/lib” >> /etc/ld.so.conf
ldconfig -v

5、查看是否升级成功

1
2
[root@~]# openssl version -a
OpenSSL 1.0.2j 26 Sep 2016

via:升级 openssl 环境至 openssl-1.0.2j