cd /usr/local/src
#wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz
#tar -zxvf openssl-1.0.1h.tar.gz
#cd openssl-1.0.1h
#./config shared zlib
#make && make install
mv /usr/bin/openssl /usr/bin/openssl.save
mv /usr/include/openssl /usr/include/openssl.save
mv /usr/lib/libssl.so /usr/lib/libssl.so.save
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
ln -sv /usr/local/ssl/lib/libssl.so /usr/lib/libssl.so
到此安装完成了,然后配置一下文件搜索路径
cd ..
echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
ldconfig -v
最后检测一下安装结果
openssl version
如果出现你的openssl的版本号即为安装成功了
时间: 2024-11-13 08:04:36