Linux升级openssl

1、查看源版本
openssl version -a
如果Linux系统默认安装了openssl,版本就是:OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

2、下载openssl-1.0.1g.tar.gz
https://www.openssl.org/source/

3、安装或更新zlib
下载http://zlib.net/zlib-1.2.8.tar.gz
tar zxf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure --prefix=/usr/local/zlib
make && make install

4、解压安装
tar zxf openssl-1.0.1g.tar.gz
cd openssl-1.0.1g
./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、查看是否升级成功
openssl version -a

你可能感兴趣的:(OpenSSL)