查看当前openssl版本
openssl version
安装openssl
# 下载
wget https://www.openssl.org/source/openssl-3.0.13.tar.gz --no-check-certificate -P /usr/src
# 安装需要用到perl,没有的话自行安装
perl -v
# 解压
tar -zxvf openssl-3.0.13.tar.gz
cd openssl-3.0.13/
./config shared zlib --openssldir=/usr/local/openssl --prefix=/usr/local/openssl
# 如果运行config时提示 Can't locate IPC/Cmd.pm in @INC,请安装IPC/Cmd.pm模块,安装之后重新运行config
yum -y install perl-IPC-Cmd
make && make install
# 备份并替换老版本的openssl
which openssl # 查看老版本位置 /bin/openssl
mv /bin/openssl /bin/openssl.bak
ln -s /usr/local/openssl/bin/openssl /bin/openssl
echo "/usr/local/openssl/lib64" >> /etc/ld.so.conf
# 动态链接库
ldconfig -v
# 查看openssl
openssl version
Comment here is closed