Centos 5.11 升级 Openssl

 

  由于Openssl版本较低,故此升级版本来解决一些小问题。

  如果在configure openssl的时候出现 perl 版本过低的问题,那么请往下翻

 

 1:查看openssl版本:

[root@server-008 ~]# openssl version
OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

 2:我们想升级成Openssl 1.0.2(任意高版本都可用以下方法进行尝试,本次实验针对1.0.2q),按照如下操作进行操作

wget https://www.openssl.org/source/openssl-1.0.2q.tar.gz --no-check-certificate

由于我的wget下载https有点问题,估计添加--no-check-certificate可以忽略https加密问题

 3:进行解压安装

tar zxvf openssl-1.0.2q.tar.gz 

cd openssl-1.0.2q

./config 

make

make install

 4:安装完成之后,可以查看openssl版本,发现还是之前的版本,不要急,过程还没有结束,继续按照如下进行操作:

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

(如若出现mv: 无法 stat “/usr/include/openssl”: 没有那个文件或目录问题,不用在意,继续操作)

 5:安装完成后,查看openssl版本是否已经升级成功:

[root@localhost /]# openssl version
OpenSSL 1.0.2q 20 Nov 2018

  至此,升级完成!

如果说出现问题

[root@localhost openssl-1.1.1]# openssl version
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

那么在root用户下执行以下命令就可以了

[root@localhost openssl-1.1.1]# ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/libssl.so.1.1
[root@localhost  openssl-1.1.1]# ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1

 如果出现说perl版本过低的情况下,那么你还要先升级perl才可以继续升级openssl

这里以perl-5.10.0做演示

1: 下载perl

http://www.cpan.org/src/perl-5.10.0.tar.gz

2: 解压安装

这个过程比较费时间,耐心等待下就好了

wget http://www.cpan.org/src/perl-5.10.0.tar.gz
tar zxvf perl-5.10.0.tar.gz 
cd perl-5.10.0
./configure.gnu -des -Dprefix=/usr/local/perl
make
make test
make install

3: 查看是否安装完成

复制代码
/usr/local/perl/bin/perl -v
This is perl, v5.10.0 built for i686-linux

Copyright 1987-2007, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
复制代码

4: 更换旧的perl

可以先查看下旧的perl在哪里

whereis perl
perl: /usr/bin/perl /usr/share/man/man1/perl.1.gz

然后把旧的perl更换下名称

mv /usr/bin/perl /usr/bin/perl.bak
ln -s /usr/local/perl/bin/perl /usr/bin/perl

5:查看是否安装完成

复制代码
perl -version

This is perl, v5.10.0 built for x86_64-linux

Copyright 1987-2007, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
复制代码

这样就可以继续安装openssl了。

 

posted @   Old·Artist  阅读(921)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示