查看当前版本
openssl version
rpm -qa |grep -i openssl
安装
./config --prefix=/usr/local/openssl shared no-zlib
make
make install
升级符号链接:
mv /usr/bin/openssl /usr/bin/openssl.bak
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/lib64/libssl.so.1.1
ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
查看安装后版本:
openssl version
更新运行环境链接:
echo /usr/local/openssl/lib >> /etc/ld.so.conf
ldconfig
更改root环境变量,在.bash_profile添加如下行:
vi ~/.bash_profile
export PATH=/usr/local/ssl/bin:$PATH
source ~/.bash_profile
重新登录,进行验证升级成功:
which openssl
/usr/local/openssl/bin/openssl
网友评论