1.查看openssl版本
[root@localhost ~]# openssl version OpenSSL 1.0.2k-fips 26 Jan 2017
2.下载指定版本的openssl软件
在下面网址:https://www.openssl.org/source/下载 后面的版本号可以换
[root@localhost ~]# wget https://www.openssl.org/source/openssl-1.1.1e.tar.gz
3.编译安装
cd /opt tar xfz openssl-1.1.1e.tar.gz -C /opt/ [root@localhost opt]# cd openssl-1.1.1e/ ./config shared zlib make && make install
4.配置
[root@localhost ~]# mv /usr/bin/openssl /usr/bin/openssl.bak [root@localhost ~]# mv /usr/include/openssl /usr/include/openssl.bak [root@localhost ~]# find / -name openssl [root@localhost ~]# ln -s /usr/local/bin/openssl /usr/bin/openssl [root@localhost ~]# ln -s /usr/local/include/openssl /usr/include/openssl [root@localhost ~]# echo "/usr/local/lib64/" >> /etc/ld.so.conf [root@localhost ~]# ldconfig [root@localhost ~]# openssl version -a
5.验证
[root@node2 openssl-1.1.1e]# openssl version OpenSSL 1.1.1e 28 May 2019