下载最新的openssl,openssl-1.0.2g.tar.gz,解压进入目录。
./config shared zlib
make
make test
make install
将/usr/bin/openssl备份,然后用已安装的openssl替换。
这个做法感觉不是特别正规。
rpm -a看到的版本一直是0.9.8e,直接使用rpm -e卸载不掉。使用yum remove卸载,会将系统所有依赖openssl的包都卸载,所以说yum这个工具,适合于安装软件,不适合卸载软件,因为它会卸载关联包,导致一些需要的包可能被卸载。
2016-3-28 补充:
注意参数:
--prefix=DIR Install in DIR/bin, DIR/lib, DIR/include/openssl.
Configuration files used by OpenSSL will be in DIR/ssl
or the directory specified by --openssldir.
--openssldir=DIR Directory for OpenSSL files. If no prefix is specified,
the library files and binaries are also installed there.