备份
cp -r /usr/bin/openssl /usr/bin/openssl_backup
cp -r /usr/lib64/openssl /usr/lib64/openssl_backup
安装依赖
yum -y install gcc perl make zlib-devel perl-CPAN
cpan IPC::Cmd
全部同意 yes 或者y
安装
1.上传openssl包至目录
2.解压文件
tar -zxvf openssl-3.1.1.tar.gz
3.设置编译参数
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib
4.安装
make -j2 && make install -j2
5.配置动态链接
echo "/usr/local/ssl/lib64" > /etc/ld.so.conf.d/openssl.conf
ldconfig
cp /usr/local/ssl/bin/openssl /usr/bin/openssl
ldconfig -v
6.检查
openssl version