升级openssl

2020-12-10  本文已影响0人  iamChel

升级openssl

网站:https://www.openssl.org/source/openssl-1.1.1g.tar.gz

1.查看openssl版本

[root@iflytek ~]# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013

2.下载最新的openssl

[root@iflytek ~]# wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz

3.解压并安装

[root@iflytek ~]# tar -zxvf openssl-1.1.1g.tar.gz
[root@iflytek ~]# cd openssl-1.1.1g/
[root@iflytek openssl-1.1.1g]# ./config --prefix=/usr/local/openssl  #如果此步骤报错,需要安装perl以及gcc包
Operating system: x86_64-whatever-linux2
Configuring OpenSSL version 1.1.1g (0x1010107fL) for linux-x86_64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
[root@iflytek openssl-1.1.1g]# make && make install

4.备份原来openssl

[root@iflytek openssl-1.1.1g]# mv /usr/bin/openssl /usr/bin/openssl.bak_oldversion

5.设置软连接并声明

[root@iflytek openssl-1.1.1g]# ln -sf /usr/local/openssl/bin/openssl /usr/bin/openssl
[root@iflytek openssl-1.1.1g]# echo "/usr/local/openssl/lib" >> /etc/ld.so.conf #openssl的库文件
[root@iflytek openssl-1.1.1g]# ldconfig -v  #设置生效

6.查看版本

[root@iflytek openssl-1.1.1g]# openssl version
OpenSSL 1.1.1g  21 Apr 2020
上一篇下一篇

猜你喜欢

热点阅读