下载链接:https://www.openssl.org/source/snapshot/
里边是当前仍支持版本的快照;同版本不同日期内容可能不同的,所以下载一般下对应版本的最新快照;安装出错则尝试另一个快照。
解压后的文件夹下有INSTALL和README等文件。
以root身份执行:
openssl version #查看安装前openssl版本
tar -zxf openssl-1.0.2-stable-SNAP-20160915.tar.gz cd openssl-1.0.2-stable-SNAP-20160915 ./config shared zlib-dynamic make depend #如果提示要运行 make #如果报错,按其建议使用./config -fPIC重新配置,shared等参数就不要了 make test make install
由于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 #在/etc/ld.so.conf文件中写入openssl库文件的搜索路径 ldconfig -v #使修改后的/etc/ld.so.conf生效 openssl version #查看版本,看更新是否成功
参考:
http://www.zuimoban.com/jiaocheng/linux/4244.html
原文:http://www.cnblogs.com/lsdb/p/6529807.html