1、查看源版本
[root@zj ~]
# openssl version -a
OpenSSL 1.0.1e
2、下载
openssl-1.0.1u.tar.gz
wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz
3、更新zlib
yum
install
-y zlib
4、解压安装
tar
zxf
openssl-1.0.1u.tar.gz
cd
openssl-1.0.1u.tar.gz
.
/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、查看是否升级成功
[root@zj ~]
# openssl version -a
OpenSSL 1.0.1u 22 Sep 2016
built on: Tue May 8 11:13:07 2018
platform: linux-x86_64
options: bn(64,64) rc4(8x,char) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: gcc -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
--------------------------------------------------------
PS:
我在执行make和make install 的时候提示fatal error: zlib.h: No such file or directory # include
此处需要安装zlib,如下为安装指南:
zlib标准安装指导:
从网上下载zlib到linux服务器后并解压
/usr/local/src/zlib-1.2.8
构建静态库
.../zlib-1.2.8]# ./configure
.../zlib-1.2.8]# make test
.../zlib-1.2.8]# make install
构建共享库
.../zlib-1.2.8]# make clean
.../zlib-1.2.8]# ./configure --shared
.../zlib-1.2.8]# make test
.../zlib-1.2.8]# make install
.../zlib-1.2.8]# cp zutil.h /usr/local/include
.../zlib-1.2.8]# cp zutil.c /usr/local/include
完成