From aa191176fae6ee3ad5e23c172ec2c0ecafb0501c Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 13 Mar 2019 14:41:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B0=E9=97=B4solr=E6=89=A9=E5=B1=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/versions/54/solr.sh | 99 +++++++++++++++++++++++++++++++++ plugins/php/versions/55/solr.sh | 99 +++++++++++++++++++++++++++++++++ plugins/php/versions/56/solr.sh | 99 +++++++++++++++++++++++++++++++++ plugins/php/versions/70/solr.sh | 99 +++++++++++++++++++++++++++++++++ plugins/php/versions/71/solr.sh | 99 +++++++++++++++++++++++++++++++++ plugins/php/versions/72/solr.sh | 99 +++++++++++++++++++++++++++++++++ plugins/php/versions/73/solr.sh | 99 +++++++++++++++++++++++++++++++++ 7 files changed, 693 insertions(+) create mode 100755 plugins/php/versions/54/solr.sh create mode 100755 plugins/php/versions/55/solr.sh create mode 100755 plugins/php/versions/56/solr.sh create mode 100755 plugins/php/versions/70/solr.sh create mode 100755 plugins/php/versions/71/solr.sh create mode 100755 plugins/php/versions/72/solr.sh create mode 100755 plugins/php/versions/73/solr.sh diff --git a/plugins/php/versions/54/solr.sh b/plugins/php/versions/54/solr.sh new file mode 100755 index 000000000..d558619a9 --- /dev/null +++ b/plugins/php/versions/54/solr.sh @@ -0,0 +1,99 @@ +#!/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") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=solr +LIBV=2.4.0 +sysName=`uname` +actionType=$1 +version=$2 + +extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20100525/ + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_${version}_lib + mkdir -p $php_lib + + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + fi + + OPTIONS='' + if [ $sysName == 'Darwin' ]; then + OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + fi + + cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS + make && make install + + cd $php_lib + rm -rf ${LIBNAME}-* + fi + sleep 1 + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install memcache, Plese select other version!" + return + fi + + sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/55/solr.sh b/plugins/php/versions/55/solr.sh new file mode 100755 index 000000000..e5e4cce62 --- /dev/null +++ b/plugins/php/versions/55/solr.sh @@ -0,0 +1,99 @@ +#!/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") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=solr +LIBV=2.4.0 +sysName=`uname` +actionType=$1 +version=$2 + +extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20121212/ + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_${version}_lib + mkdir -p $php_lib + + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + fi + + OPTIONS='' + if [ $sysName == 'Darwin' ]; then + OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + fi + + cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS + make && make install + + cd $php_lib + rm -rf ${LIBNAME}-* + fi + sleep 1 + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install memcache, Plese select other version!" + return + fi + + sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/56/solr.sh b/plugins/php/versions/56/solr.sh new file mode 100755 index 000000000..ca93ffa40 --- /dev/null +++ b/plugins/php/versions/56/solr.sh @@ -0,0 +1,99 @@ +#!/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") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=solr +LIBV=2.4.0 +sysName=`uname` +actionType=$1 +version=$2 + +extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/ + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_${version}_lib + mkdir -p $php_lib + + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + fi + + OPTIONS='' + if [ $sysName == 'Darwin' ]; then + OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + fi + + cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS + make && make install + + cd $php_lib + rm -rf ${LIBNAME}-* + fi + sleep 1 + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install memcache, Plese select other version!" + return + fi + + sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/70/solr.sh b/plugins/php/versions/70/solr.sh new file mode 100755 index 000000000..6d23e03e9 --- /dev/null +++ b/plugins/php/versions/70/solr.sh @@ -0,0 +1,99 @@ +#!/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") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=solr +LIBV=2.4.0 +sysName=`uname` +actionType=$1 +version=$2 + +extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20151012/ + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_${version}_lib + mkdir -p $php_lib + + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + fi + + OPTIONS='' + if [ $sysName == 'Darwin' ]; then + OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + fi + + cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS + make && make install + + cd $php_lib + rm -rf ${LIBNAME}-* + fi + sleep 1 + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install memcache, Plese select other version!" + return + fi + + sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/71/solr.sh b/plugins/php/versions/71/solr.sh new file mode 100755 index 000000000..83918c773 --- /dev/null +++ b/plugins/php/versions/71/solr.sh @@ -0,0 +1,99 @@ +#!/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") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=solr +LIBV=2.4.0 +sysName=`uname` +actionType=$1 +version=$2 + +extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/ + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_${version}_lib + mkdir -p $php_lib + + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + fi + + OPTIONS='' + if [ $sysName == 'Darwin' ]; then + OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + fi + + cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS + make && make install + + cd $php_lib + rm -rf ${LIBNAME}-* + fi + sleep 1 + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install memcache, Plese select other version!" + return + fi + + sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/72/solr.sh b/plugins/php/versions/72/solr.sh new file mode 100755 index 000000000..322d53bf7 --- /dev/null +++ b/plugins/php/versions/72/solr.sh @@ -0,0 +1,99 @@ +#!/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") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=solr +LIBV=2.4.0 +sysName=`uname` +actionType=$1 +version=$2 + +extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20170718/ + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_${version}_lib + mkdir -p $php_lib + + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + fi + + OPTIONS='' + if [ $sysName == 'Darwin' ]; then + OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + fi + + cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS + make && make install + + cd $php_lib + rm -rf ${LIBNAME}-* + fi + sleep 1 + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install memcache, Plese select other version!" + return + fi + + sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/73/solr.sh b/plugins/php/versions/73/solr.sh new file mode 100755 index 000000000..4d75b2d66 --- /dev/null +++ b/plugins/php/versions/73/solr.sh @@ -0,0 +1,99 @@ +#!/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") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=solr +LIBV=2.4.0 +sysName=`uname` +actionType=$1 +version=$2 + +extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20180731/ + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_${version}_lib + mkdir -p $php_lib + + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + fi + + OPTIONS='' + if [ $sysName == 'Darwin' ]; then + OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" + fi + + cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS + make && make install + + cd $php_lib + rm -rf ${LIBNAME}-* + fi + sleep 1 + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + extFile=$extDir${LIBNAME}.so + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$vphp not install memcache, Plese select other version!" + return + fi + + sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini + sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini + + rm -f $extFile + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file