首先下载并编译需要升级到的openssl,本文以openssl-1.1.1w为例
wget https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz
tar -zxvf openssl-1.1.1w.tar.gz
cd openssl-1.1.1w
./config -fPIC --prefix=/usr/local/openssl-1.1.1w --openssldir=/usr/local/openssl-1.1.1w
make
make install
然后去重新编译php,添加指定的openssl
mv /usr/local/php-7.2 /usr/local/php-7.2-bak;
vi /root/amh/modules/php-7.2/AMHScript
amh_module_install 安装函数,找到
./configure –prefix=${ModuleInstallPath} ….
在上面增加两行,
即:
with_openssl='--with-openssl=/usr/local/openssl-1.1.1w';
export PKG_CONFIG_PATH="/usr/local/libzip-1.3.2/lib/pkgconfig:/usr/local/openssl-1.1.1w/lib/pkgconfig";
amh php-7.2 install