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

相关推荐
Lsetea3 天前
CDN换了SSL证书仍显示旧证书?按边缘节点、SNI和缓存逐层排查
https·cdn·ssl证书·openssl·tls
Lsetea4 天前
Nginx HTTPS证书域名不匹配:用SAN与SNI定位 ERR_CERT_COMMON_NAME_INVALID
nginx·https·ssl证书·openssl·tls
bosins8 天前
Windows IIS 配置本地HTTPS 全流程指南:自签名证书 + 端口绑定 + 避坑详解
powershell·openssl
Lsetea12 天前
Nginx报SSL_CTX_use_PrivateKey failed:证书与私钥不匹配怎么排查
nginx·https·ssl证书·openssl·私钥
Lsetea14 天前
SSL证书快过期怎么自动检查:用OpenSSL checkend做7天预警与线上证书验收
https·ssl证书·openssl·systemd·证书监控
蜡台1 个月前
本机 局域网 搭建本地 HTTPS 域名完整方案
网络协议·http·https·openssl
qetfw1 个月前
Debian OpenSSL CA 证书配置参考:根证书、服务证书与验证
linux·debian·ssl·openssl
qetfw1 个月前
Debian OpenSSL 搭建 CA 证书服务:签发、吊销与客户端信任
linux·debian·openssl·ca
smaller_maple3 个月前
T113开启openssh
openssl·openssh·t113开启ssh
dling86 个月前
OpenSSL和keytool的区别?如何使用?
openssl·keytool