cenots7升级openssl
时间: 2023-12-12 13:33:36 浏览: 79
以下是CentOS 7升级OpenSSL的步骤:
1.安装编译工具和依赖项
```shell
yum install -y gcc make perl openssl-devel
```
2.下载并解压OpenSSL源代码
```shell
wget https://www.openssl.org/source/openssl-1.1.1s.tar.gz
tar -zxvf openssl-1.1.1s.tar.gz
cd openssl-1.1.1s
```
3.编译和安装OpenSSL
```shell
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl shared zlib
make && make install
```
4.输出详细的OpenSSL信息
```shell
openssl version -a
```
5.创建新的OpenSSL软连接
```shell
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/lib64/libssl.so
ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so
```
6.修改系统配置
```shell
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
ldconfig -v
```
7.查看OpenSSL版本
```shell
openssl version
```
阅读全文