1、当前系统版本号
- -sh-4.1$ cat /etc/redhat-release
- CentOS release 6.5 (Final)
- -sh-4.1$ uname -m
- x86_64
- -sh-4.1$ uname -r
- 2.6.32-431.17.1.el6.x86_64
2、SSL版本号信息
3、更新zlib
- # yum install -y zlib
4、解压安装 OpenSSL
- # pwd
- /root/tools
- # ls
- openssl-1.0.1g.tar.gz
- # tar xf openssl-1.0.1g.tar.gz
- # cd openssl-1.0.1g
- # ./config shared zlib
- # make
- # make install
- # cd ..
- # mv /usr/bin/openssl /usr/bin/openssl.ori # 将之前的备份
- # mv /usr/include/openssl /usr/include/openssl.ori
- # ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl # 软链接
- # ln -s /usr/local/ssl/include/openssl /usr/include/openssl
- # cp /etc/ld.so.conf /etc/ld.so.conf.ori # 操作前备份【这样假设出现错误,能够及时还原】
- # echo “/usr/local/ssl/lib” >> /etc/ld.so.conf
- # ldconfig -v
当中 /etc/ld.so.conf 改动后的信息【使用vim改动】
- [zhang@zhang ~] $ cat /etc/ld.so.conf
- include ld.so.conf.d/*.conf
- # Update openssl from OpenSSL 1.0.1e-fips To OpenSSL 1.0.1g
- /usr/local/ssl/lib
5、查看是否升级成功
- # openssl version
- OpenSSL 1.0.1g 7 Apr 2014 # 升级成功
另请參考