Linux升级openssl

1.查看openssl版本

#openssl version –a

2.安装依赖包

yum -y install zlib-devel perl gcc

3.下载新版版本并编译安装

openssl下载地址

tar -zxvf openssl-1.1.0h.tar.gz
cd openssl-1.1.0h
./config shared
make depend
make && make install

4.复制并升级openssl程序文件

mv /usr/bin/openssl /usr/bin/openssl.old
mv /usr/include/openssl /usr/include/openssl.old
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
echo “/usr/local/ssl/lib” >> /etc/ld.so.conf
ldconfig -v
如运行openssl version -a 提示:
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
则:
ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/libssl.so.1.1
ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1

你可能感兴趣的:(Linux系统)