centos7 安装openssl

1.下载openssl
官网地址:https://www.openssl.org/source/

wget https://www.openssl.org/source/openssl-3.0.14.tar.gz
tar -zxvf openssl-3.0.14.tar.gz
cd openssl-3.0.14

2.编译安装

yum -y install perl-IPC-Cmd
./config --prefix=/usr/local/openssl
make
make install

3.备份原配置

mv /usr/bin/openssl /usr/bin/openssl.bak
mv /usr/include/openssl/ /usr/include/openssl.bak

4.新版配置

ln -s /usr/local/openssl/include/openssl /usr/include/openssl
ln -s /usr/local/openssl/lib64/libssl.so.3 /usr/local/lib64/libssl.so
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl

5.写入openssl库文件的搜索路径

echo "/usr/local/openssl/lib64" >> /etc/ld.so.conf

6.使修改后的/etc/ld.so.conf生效

ldconfig -v

7.查看openssl版本

openssl version

8.查看openssl的位置

which openssl
posted @ 2024-07-06 14:41  丿情义灬绝天  阅读(124)  评论(0编辑  收藏  举报