centos7.9升级OpenSSL 1.1.1

centos7.9升级openssl

人工智能已经很准了:

问题:

root@centos01 \~# openssl version

OpenSSL 1.0.2k-fips 26 Jan 2017

root@centos01 \~# cat /etc/redhat-release

CentOS Linux release 7.9.2009 (Core) 需要升级OpenSSL,请给出具体步骤

根据搜索结果和当前系统环境,以下是升级CentOS 7.9上OpenSSL从1.0.2k到1.1.1版本的具体步骤:

1. 安装编译依赖

bash

复制代码
yum install -y gcc make perl zlib-devel wget

2. 备份原有OpenSSL

bash

复制代码
mv /usr/bin/openssl /usr/bin/openssl.old
mv /usr/include/openssl /usr/include/openssl.old

3. 下载并解压OpenSSL源码

bash

复制代码
cd /usr/local/src
wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz
tar -zxvf openssl-1.1.1w.tar.gz
cd openssl-1.1.1w

4. 编译并安装OpenSSL

bash

复制代码
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl shared zlib
make
make install

5. 配置系统使用新版本

创建符号链接

bash

复制代码
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
更新动态库路径

bash

复制代码
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf.d/openssl.conf
ldconfig -v

6. 验证升级结果

bash

复制代码
openssl version

输出应为: OpenSSL 1.1.1w 11 Sep 2023

相关推荐
Lsetea9 天前
OpenSSL的checkhost显示不匹配却退出0:名称检查与证书验收
linux·https·shell·ssl证书·openssl
Lsetea10 天前
OpenSSL的showcerts没有根证书正常吗:服务端发链与show_chain构链排查
https·ssl证书·openssl·tls·证书链
Lsetea12 天前
SSL证书指纹相同但文件哈希不同:PEM、DER与公钥摘要怎么比
运维·https·ssl证书·openssl·证书链
Lsetea12 天前
OpenSSL指定-cipher仍协商TLS1.3:证书排查中的套件与协议边界
运维·https·ssl证书·openssl·tls
Lsetea14 天前
curl设置SSL_CERT_FILE仍报60:CURL_CA_BUNDLE与CA路径优先级排查
linux·https·ssl证书·openssl·curl
Lsetea15 天前
OpenSSL报certificate rejected:error 28与CA辅助信任属性排查
linux·https·ssl证书·openssl·证书链
Lsetea16 天前
OpenSSL报certificate revoked:error 23与CRL吊销层级排查
linux·https·ssl证书·openssl·crl
Lsetea17 天前
OpenSSL报certificate chain too long:error 22与verify_depth深度排查
linux·https·ssl证书·openssl·证书链
Lsetea18 天前
OpenSSL读取加密私钥报bad decrypt:passin与口令来源排查
linux·https·ssl证书·openssl·私钥