diff --git a/plugins/mysql/versions/5.6/install.sh b/plugins/mysql/versions/5.6/install.sh index 202b3df84..63003dabc 100755 --- a/plugins/mysql/versions/5.6/install.sh +++ b/plugins/mysql/versions/5.6/install.sh @@ -76,9 +76,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 openssl10.sh + export PKG_CONFIG_PATH=$serverPath/lib/openssl10/lib/pkgconfig + OPTIONS="-DWITH_SSL=${serverPath}/lib/openssl10" fi if [ ! -d $serverPath/mysql ];then 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 +