centos 安装openssl
前置安装
1 2 3 |
yum -y install perl-IPC-Cmd yum -y install perl-I* |
openssl 3.0.15https://github.com/openssl/openssl/releases/download/openssl-3.0.15/openssl-3.0.15.tar.gz
2.编译安装
1 2 3 4 |
./config --prefix=/usr/local/openssl make make install |
3.备份原配置
1 2 3 |
mv /usr/bin/openssl /usr/bin/openssl.bak mv /usr/include/openssl/ /usr/include/openssl.bak |
添加软链
1 2 3 4 5 6 7 8 9 10 |
# 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 ln -s /usr/local/openssl/lib64/libssl.so.3 /usr/lib64/libssl.so.3 ln -s /usr/local/openssl/lib64/libcrypto.so.3 /usr/lib64/libcrypto.so.3 |
1 2 3 4 5 6 7 8 9 |
# 5.修改系统配置 ## 写入openssl库文件的搜索路径 echo "/usr/local/openssl/lib64" >> /etc/ld.so.conf ## 使修改后的/etc/ld.so.conf生效 ldconfig -v # 6.查看openssl版本 openssl version |
查找文件
1 2 3 |
find / -name libssl.so.3 find / -name libcrypto.so.3 |
python3 编辑时添加
1 2 |
./configure --prefix=/usr/local/python3 --with-openssl=/usr/local/openssl |
Leave a Comment