From 907851c41399cfa50d27ba41db638bccd49c2f86 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 17 Aug 2023 17:29:04 +0800 Subject: [PATCH] update --- plugins/mysql/versions/5.7/install.sh | 6 +++--- plugins/php/lib/openssl_11.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 plugins/php/lib/openssl_11.sh diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh index d98e2c27c..93c67b425 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -91,9 +91,9 @@ Install_mysql() OPENSSL_VERSION=`openssl version|awk '{print $2}'|awk -F '.' '{print $1}'` if [ "${OPENSSL_VERSION}" -ge "3" ];then #openssl version to high - cd ${rootPath}/plugins/php/lib && /bin/bash openssl.sh - export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig - OPTIONS="-DWITH_SSL=${serverPath}/lib/openssl" + cd ${rootPath}/plugins/php/lib && /bin/bash openssl_11.sh + export PKG_CONFIG_PATH=$serverPath/lib/openssl11/lib/pkgconfig + OPTIONS="-DWITH_SSL=${serverPath}/lib/openssl11" fi if [ ! -d $serverPath/mysql ];then diff --git a/plugins/php/lib/openssl_11.sh b/plugins/php/lib/openssl_11.sh new file mode 100644 index 000000000..e259a59eb --- /dev/null +++ b/plugins/php/lib/openssl_11.sh @@ -0,0 +1,27 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +opensslVersion="1.1.1p" +# echo $rootPath + +SERVER_ROOT=$rootPath/lib +SOURCE_ROOT=$rootPath/source/lib +mkdir -p $SOURCE_ROOT + +if [ ! -d ${SERVER_ROOT}/openssl11 ];then + cd ${SOURCE_ROOT} + if [ ! -f ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz ];then + wget --no-check-certificate -O ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz https://www.openssl.org/source/openssl-${opensslVersion}.tar.gz + fi + tar -zxvf openssl-${opensslVersion}.tar.gz + cd openssl-${opensslVersion} + ./config --prefix=${SERVER_ROOT}/openssl11 zlib-dynamic shared + make && make install +fi +