第四章 编译安装 OpenSSL
本章编译安装 OpenSSL 的 1.1.0c 版本。
安装 OpenSSL 1.1.0c 为系统默认版本,会导致 PHP 无法编译通过,需要 另行编译一个 1.0.x 版本的给 PHP 使用。
因此如果没特殊需要,本章可以跳过。
0. 清理旧版 OpenSSL
yum remove openssl -y
rm -rf /etc/ssl
1. 编译 OpenSSL
cd /mnt/temp
tar -zxvf openssl-1.1.0c.tar.gz
cd openssl-1.1.0c
./config --prefix=/usr/local --openssldir=/usr/local/ssl
make -j4 && make install
./config shared --prefix=/usr/local --openssldir=/usr/local/ssl
make clean
make -j4 && make install
编译完成,重新登录即可使用 openssl 命令
2. 校验安装
执行下面的命令可以查看当前 openssl 的版本
openssl version -a
comments powered by Disqus