From 4e42e1bd667f473786f0246996023ae4e6f5736e Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 9 Jul 2022 17:49:25 +0800 Subject: [PATCH] up --- plugins/php/versions/52/redis.sh | 100 ---------------- plugins/php/versions/52/xhprof.sh | 103 ---------------- plugins/php/versions/53/ioncube.sh | 96 --------------- plugins/php/versions/53/redis.sh | 100 ---------------- plugins/php/versions/53/seaslog.sh | 107 ----------------- plugins/php/versions/53/xdebug.sh | 98 --------------- plugins/php/versions/53/xhprof.sh | 103 ---------------- plugins/php/versions/54/imagemagick.sh | 96 --------------- plugins/php/versions/54/ioncube.sh | 96 --------------- plugins/php/versions/54/redis.sh | 98 --------------- plugins/php/versions/54/seaslog.sh | 107 ----------------- plugins/php/versions/54/xdebug.sh | 95 --------------- plugins/php/versions/54/xhprof.sh | 101 ---------------- plugins/php/versions/55/imagemagick.sh | 96 --------------- plugins/php/versions/55/ioncube.sh | 96 --------------- plugins/php/versions/55/opcache.sh | 69 ----------- plugins/php/versions/55/redis.sh | 98 --------------- plugins/php/versions/55/seaslog.sh | 106 ----------------- plugins/php/versions/55/xdebug.sh | 99 ---------------- plugins/php/versions/55/xhprof.sh | 104 ---------------- plugins/php/versions/56/imagemagick.sh | 96 --------------- plugins/php/versions/56/ioncube.sh | 96 --------------- plugins/php/versions/56/opcache.sh | 68 ----------- plugins/php/versions/56/redis.sh | 97 --------------- plugins/php/versions/56/seaslog.sh | 104 ---------------- plugins/php/versions/56/xdebug.sh | 97 --------------- plugins/php/versions/56/xhprof.sh | 103 ---------------- plugins/php/versions/70/ioncube.sh | 96 --------------- plugins/php/versions/70/memcached.sh | 97 --------------- plugins/php/versions/70/mongodb.sh | 96 --------------- plugins/php/versions/70/opcache.sh | 68 ----------- plugins/php/versions/70/redis.sh | 98 --------------- plugins/php/versions/70/seaslog.sh | 105 ---------------- plugins/php/versions/70/solr.sh | 103 ---------------- plugins/php/versions/70/xhprof.sh | 102 ---------------- plugins/php/versions/70/yac.sh | 99 ---------------- plugins/php/versions/70/yaf.sh | 101 ---------------- plugins/php/versions/70/yar.sh | 106 ----------------- plugins/php/versions/70/zip.sh | 100 ---------------- plugins/php/versions/71/imagemagick.sh | 96 --------------- plugins/php/versions/71/ioncube.sh | 96 --------------- plugins/php/versions/71/memcached.sh | 98 --------------- plugins/php/versions/71/mongodb.sh | 96 --------------- plugins/php/versions/71/opcache.sh | 68 ----------- plugins/php/versions/71/redis.sh | 97 --------------- plugins/php/versions/71/seaslog.sh | 106 ----------------- plugins/php/versions/71/solr.sh | 103 ---------------- plugins/php/versions/71/yac.sh | 102 ---------------- plugins/php/versions/71/yaf.sh | 100 ---------------- plugins/php/versions/71/yar.sh | 109 ----------------- plugins/php/versions/71/zip.sh | 100 ---------------- plugins/php/versions/71/zlib.sh | 102 ---------------- plugins/php/versions/72/imagemagick.sh | 96 --------------- plugins/php/versions/72/ioncube.sh | 96 --------------- plugins/php/versions/72/mcrypt.sh | 100 ---------------- plugins/php/versions/72/memcached.sh | 99 ---------------- plugins/php/versions/72/mongodb.sh | 97 --------------- plugins/php/versions/72/opcache.sh | 68 ----------- plugins/php/versions/72/redis.sh | 97 --------------- plugins/php/versions/72/seaslog.sh | 105 ---------------- plugins/php/versions/72/solr.sh | 103 ---------------- plugins/php/versions/72/xdebug.sh | 94 --------------- plugins/php/versions/72/xhprof.sh | 102 ---------------- plugins/php/versions/72/yaf.sh | 101 ---------------- plugins/php/versions/72/yar.sh | 110 ----------------- plugins/php/versions/72/zip.sh | 100 ---------------- plugins/php/versions/72/zlib.sh | 102 ---------------- plugins/php/versions/73/imagemagick.sh | 96 --------------- plugins/php/versions/73/ioncube.sh | 96 --------------- plugins/php/versions/73/mcrypt.sh | 100 ---------------- plugins/php/versions/73/memcached.sh | 97 --------------- plugins/php/versions/73/mongodb.sh | 94 --------------- plugins/php/versions/73/opcache.sh | 69 ----------- plugins/php/versions/73/redis.sh | 96 --------------- plugins/php/versions/73/seaslog.sh | 105 ---------------- plugins/php/versions/73/solr.sh | 104 ---------------- plugins/php/versions/73/swoole.sh | 110 ----------------- plugins/php/versions/73/xdebug.sh | 95 --------------- plugins/php/versions/73/xhprof.sh | 102 ---------------- plugins/php/versions/73/yac.sh | 99 ---------------- plugins/php/versions/73/yaf.sh | 98 --------------- plugins/php/versions/73/yar.sh | 103 ---------------- plugins/php/versions/73/zip.sh | 100 ---------------- plugins/php/versions/73/zlib.sh | 102 ---------------- plugins/php/versions/74/imagemagick.sh | 96 --------------- plugins/php/versions/74/ioncube.sh | 96 --------------- plugins/php/versions/74/mongodb.sh | 96 --------------- plugins/php/versions/74/opcache.sh | 68 ----------- plugins/php/versions/74/seaslog.sh | 105 ---------------- plugins/php/versions/74/swoole.sh | 112 ------------------ plugins/php/versions/74/xhprof.sh | 103 ---------------- plugins/php/versions/74/yac.sh | 99 ---------------- plugins/php/versions/74/yaf.sh | 98 --------------- plugins/php/versions/74/yar.sh | 103 ---------------- plugins/php/versions/74/zip.sh | 100 ---------------- plugins/php/versions/74/zlib.sh | 102 ---------------- plugins/php/versions/80/gd.sh | 103 ---------------- plugins/php/versions/80/imagemagick.sh | 96 --------------- plugins/php/versions/80/mcrypt.sh | 100 ---------------- plugins/php/versions/80/memcached.sh | 101 ---------------- plugins/php/versions/80/mongodb.sh | 96 --------------- plugins/php/versions/80/opcache.sh | 71 ----------- plugins/php/versions/80/redis.sh | 98 --------------- plugins/php/versions/80/solr.sh | 103 ---------------- plugins/php/versions/80/swoole.sh | 111 ----------------- plugins/php/versions/80/xdebug.sh | 97 --------------- plugins/php/versions/80/xhprof.sh | 102 ---------------- plugins/php/versions/80/yac.sh | 99 ---------------- plugins/php/versions/80/yar.sh | 103 ---------------- plugins/php/versions/80/zlib.sh | 102 ---------------- plugins/php/versions/81/gd.sh | 103 ---------------- plugins/php/versions/81/imagemagick.sh | 96 --------------- plugins/php/versions/81/mcrypt.sh | 100 ---------------- plugins/php/versions/81/memcached.sh | 99 ---------------- plugins/php/versions/81/redis.sh | 99 ---------------- plugins/php/versions/81/seaslog.sh | 105 ---------------- plugins/php/versions/81/solr.sh | 103 ---------------- plugins/php/versions/81/swoole.sh | 111 ----------------- plugins/php/versions/81/xdebug.sh | 97 --------------- plugins/php/versions/81/xhprof.sh | 102 ---------------- plugins/php/versions/81/yac.sh | 99 ---------------- plugins/php/versions/81/yaf.sh | 99 ---------------- plugins/php/versions/81/zip.sh | 102 ---------------- plugins/php/versions/81/zlib.sh | 102 ---------------- plugins/php/versions/{74 => common}/gd.sh | 0 .../versions/{70 => common}/imagemagick.sh | 0 .../php/versions/{52 => common}/ioncube.sh | 2 + plugins/php/versions/{74 => common}/mcrypt.sh | 2 +- .../php/versions/{74 => common}/memcached.sh | 3 +- .../php/versions/{81 => common}/mongodb.sh | 10 +- .../php/versions/{81 => common}/opcache.sh | 0 plugins/php/versions/{74 => common}/redis.sh | 12 +- .../php/versions/{80 => common}/seaslog.sh | 0 plugins/php/versions/{74 => common}/solr.sh | 0 plugins/php/versions/{72 => common}/swoole.sh | 0 plugins/php/versions/{74 => common}/xdebug.sh | 7 +- plugins/php/versions/{71 => common}/xhprof.sh | 5 +- plugins/php/versions/{72 => common}/yac.sh | 0 plugins/php/versions/{80 => common}/yaf.sh | 7 +- plugins/php/versions/{81 => common}/yar.sh | 13 +- plugins/php/versions/{80 => common}/zip.sh | 0 plugins/php/versions/{70 => common}/zlib.sh | 0 142 files changed, 43 insertions(+), 12204 deletions(-) delete mode 100755 plugins/php/versions/52/redis.sh delete mode 100755 plugins/php/versions/52/xhprof.sh delete mode 100755 plugins/php/versions/53/ioncube.sh delete mode 100755 plugins/php/versions/53/redis.sh delete mode 100755 plugins/php/versions/53/seaslog.sh delete mode 100755 plugins/php/versions/53/xdebug.sh delete mode 100755 plugins/php/versions/53/xhprof.sh delete mode 100755 plugins/php/versions/54/imagemagick.sh delete mode 100755 plugins/php/versions/54/ioncube.sh delete mode 100755 plugins/php/versions/54/redis.sh delete mode 100755 plugins/php/versions/54/seaslog.sh delete mode 100755 plugins/php/versions/54/xdebug.sh delete mode 100755 plugins/php/versions/54/xhprof.sh delete mode 100755 plugins/php/versions/55/imagemagick.sh delete mode 100755 plugins/php/versions/55/ioncube.sh delete mode 100755 plugins/php/versions/55/opcache.sh delete mode 100755 plugins/php/versions/55/redis.sh delete mode 100755 plugins/php/versions/55/seaslog.sh delete mode 100755 plugins/php/versions/55/xdebug.sh delete mode 100755 plugins/php/versions/55/xhprof.sh delete mode 100755 plugins/php/versions/56/imagemagick.sh delete mode 100755 plugins/php/versions/56/ioncube.sh delete mode 100755 plugins/php/versions/56/opcache.sh delete mode 100755 plugins/php/versions/56/redis.sh delete mode 100755 plugins/php/versions/56/seaslog.sh delete mode 100755 plugins/php/versions/56/xdebug.sh delete mode 100755 plugins/php/versions/56/xhprof.sh delete mode 100755 plugins/php/versions/70/ioncube.sh delete mode 100755 plugins/php/versions/70/memcached.sh delete mode 100755 plugins/php/versions/70/mongodb.sh delete mode 100755 plugins/php/versions/70/opcache.sh delete mode 100755 plugins/php/versions/70/redis.sh delete mode 100755 plugins/php/versions/70/seaslog.sh delete mode 100755 plugins/php/versions/70/solr.sh delete mode 100755 plugins/php/versions/70/xhprof.sh delete mode 100755 plugins/php/versions/70/yac.sh delete mode 100755 plugins/php/versions/70/yaf.sh delete mode 100755 plugins/php/versions/70/yar.sh delete mode 100755 plugins/php/versions/70/zip.sh delete mode 100755 plugins/php/versions/71/imagemagick.sh delete mode 100755 plugins/php/versions/71/ioncube.sh delete mode 100755 plugins/php/versions/71/memcached.sh delete mode 100755 plugins/php/versions/71/mongodb.sh delete mode 100755 plugins/php/versions/71/opcache.sh delete mode 100755 plugins/php/versions/71/redis.sh delete mode 100755 plugins/php/versions/71/seaslog.sh delete mode 100755 plugins/php/versions/71/solr.sh delete mode 100755 plugins/php/versions/71/yac.sh delete mode 100755 plugins/php/versions/71/yaf.sh delete mode 100755 plugins/php/versions/71/yar.sh delete mode 100755 plugins/php/versions/71/zip.sh delete mode 100755 plugins/php/versions/71/zlib.sh delete mode 100755 plugins/php/versions/72/imagemagick.sh delete mode 100755 plugins/php/versions/72/ioncube.sh delete mode 100755 plugins/php/versions/72/mcrypt.sh delete mode 100755 plugins/php/versions/72/memcached.sh delete mode 100755 plugins/php/versions/72/mongodb.sh delete mode 100755 plugins/php/versions/72/opcache.sh delete mode 100755 plugins/php/versions/72/redis.sh delete mode 100755 plugins/php/versions/72/seaslog.sh delete mode 100755 plugins/php/versions/72/solr.sh delete mode 100755 plugins/php/versions/72/xdebug.sh delete mode 100755 plugins/php/versions/72/xhprof.sh delete mode 100755 plugins/php/versions/72/yaf.sh delete mode 100755 plugins/php/versions/72/yar.sh delete mode 100755 plugins/php/versions/72/zip.sh delete mode 100755 plugins/php/versions/72/zlib.sh delete mode 100755 plugins/php/versions/73/imagemagick.sh delete mode 100755 plugins/php/versions/73/ioncube.sh delete mode 100755 plugins/php/versions/73/mcrypt.sh delete mode 100755 plugins/php/versions/73/memcached.sh delete mode 100755 plugins/php/versions/73/mongodb.sh delete mode 100755 plugins/php/versions/73/opcache.sh delete mode 100755 plugins/php/versions/73/redis.sh delete mode 100755 plugins/php/versions/73/seaslog.sh delete mode 100755 plugins/php/versions/73/solr.sh delete mode 100755 plugins/php/versions/73/swoole.sh delete mode 100755 plugins/php/versions/73/xdebug.sh delete mode 100755 plugins/php/versions/73/xhprof.sh delete mode 100755 plugins/php/versions/73/yac.sh delete mode 100755 plugins/php/versions/73/yaf.sh delete mode 100755 plugins/php/versions/73/yar.sh delete mode 100755 plugins/php/versions/73/zip.sh delete mode 100755 plugins/php/versions/73/zlib.sh delete mode 100755 plugins/php/versions/74/imagemagick.sh delete mode 100755 plugins/php/versions/74/ioncube.sh delete mode 100755 plugins/php/versions/74/mongodb.sh delete mode 100755 plugins/php/versions/74/opcache.sh delete mode 100755 plugins/php/versions/74/seaslog.sh delete mode 100755 plugins/php/versions/74/swoole.sh delete mode 100755 plugins/php/versions/74/xhprof.sh delete mode 100755 plugins/php/versions/74/yac.sh delete mode 100755 plugins/php/versions/74/yaf.sh delete mode 100755 plugins/php/versions/74/yar.sh delete mode 100755 plugins/php/versions/74/zip.sh delete mode 100755 plugins/php/versions/74/zlib.sh delete mode 100755 plugins/php/versions/80/gd.sh delete mode 100755 plugins/php/versions/80/imagemagick.sh delete mode 100755 plugins/php/versions/80/mcrypt.sh delete mode 100755 plugins/php/versions/80/memcached.sh delete mode 100755 plugins/php/versions/80/mongodb.sh delete mode 100755 plugins/php/versions/80/opcache.sh delete mode 100755 plugins/php/versions/80/redis.sh delete mode 100755 plugins/php/versions/80/solr.sh delete mode 100755 plugins/php/versions/80/swoole.sh delete mode 100755 plugins/php/versions/80/xdebug.sh delete mode 100755 plugins/php/versions/80/xhprof.sh delete mode 100755 plugins/php/versions/80/yac.sh delete mode 100755 plugins/php/versions/80/yar.sh delete mode 100755 plugins/php/versions/80/zlib.sh delete mode 100755 plugins/php/versions/81/gd.sh delete mode 100755 plugins/php/versions/81/imagemagick.sh delete mode 100755 plugins/php/versions/81/mcrypt.sh delete mode 100755 plugins/php/versions/81/memcached.sh delete mode 100755 plugins/php/versions/81/redis.sh delete mode 100755 plugins/php/versions/81/seaslog.sh delete mode 100755 plugins/php/versions/81/solr.sh delete mode 100755 plugins/php/versions/81/swoole.sh delete mode 100755 plugins/php/versions/81/xdebug.sh delete mode 100755 plugins/php/versions/81/xhprof.sh delete mode 100755 plugins/php/versions/81/yac.sh delete mode 100755 plugins/php/versions/81/yaf.sh delete mode 100755 plugins/php/versions/81/zip.sh delete mode 100755 plugins/php/versions/81/zlib.sh rename plugins/php/versions/{74 => common}/gd.sh (100%) rename plugins/php/versions/{70 => common}/imagemagick.sh (100%) rename plugins/php/versions/{52 => common}/ioncube.sh (99%) rename plugins/php/versions/{74 => common}/mcrypt.sh (99%) rename plugins/php/versions/{74 => common}/memcached.sh (99%) rename plugins/php/versions/{81 => common}/mongodb.sh (95%) rename plugins/php/versions/{81 => common}/opcache.sh (100%) rename plugins/php/versions/{74 => common}/redis.sh (95%) rename plugins/php/versions/{80 => common}/seaslog.sh (100%) rename plugins/php/versions/{74 => common}/solr.sh (100%) rename plugins/php/versions/{72 => common}/swoole.sh (100%) rename plugins/php/versions/{74 => common}/xdebug.sh (97%) rename plugins/php/versions/{71 => common}/xhprof.sh (98%) rename plugins/php/versions/{72 => common}/yac.sh (100%) rename plugins/php/versions/{80 => common}/yaf.sh (99%) rename plugins/php/versions/{81 => common}/yar.sh (99%) rename plugins/php/versions/{80 => common}/zip.sh (100%) rename plugins/php/versions/{70 => common}/zlib.sh (100%) diff --git a/plugins/php/versions/52/redis.sh b/plugins/php/versions/52/redis.sh deleted file mode 100755 index df5e93651..000000000 --- a/plugins/php/versions/52/redis.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/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=redis -LIBV=2.2.7 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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_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 - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/52/xhprof.sh b/plugins/php/versions/52/xhprof.sh deleted file mode 100755 index c80b5dbe2..000000000 --- a/plugins/php/versions/52/xhprof.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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=xhprof -LIBV=0.9.4 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV}/extension - - $serverPath/php/$version/bin/phpize - ./configure --enable-xhprof \ - --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - if [ ! -f /tmp/xhprof ];then - mkdir -p /tmp/xhprof - chown -R www:www /tmp/xhprof - 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 - echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/53/ioncube.sh b/plugins/php/versions/53/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php/versions/53/ioncube.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=ioncube -LIBV=0 -sysName=`uname` -actionType=$1 -version=$2 -IC_VERSION=${version:0:1}.${version:1:2} - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} -extFile=${extDir}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then - wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz - cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz - fi - cd $php_lib/ioncube - - cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/53/redis.sh b/plugins/php/versions/53/redis.sh deleted file mode 100755 index d3e0ab9ae..000000000 --- a/plugins/php/versions/53/redis.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/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=redis -LIBV=4.2.0 -sysName=`uname` -actionType=$1 -version=$2 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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_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 - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/53/seaslog.sh b/plugins/php/versions/53/seaslog.sh deleted file mode 100755 index 0c5c01176..000000000 --- a/plugins/php/versions/53/seaslog.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/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=SeasLog -_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') -LIBV=2.0.2 -sysName=`uname` -actionType=$1 -version=$2 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_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 - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, Plese select other version!" - return - fi - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/53/xdebug.sh b/plugins/php/versions/53/xdebug.sh deleted file mode 100755 index 34c0b80a1..000000000 --- a/plugins/php/versions/53/xdebug.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/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=xdebug -LIBV=2.2.7 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/53/xhprof.sh b/plugins/php/versions/53/xhprof.sh deleted file mode 100755 index c80b5dbe2..000000000 --- a/plugins/php/versions/53/xhprof.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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=xhprof -LIBV=0.9.4 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV}/extension - - $serverPath/php/$version/bin/phpize - ./configure --enable-xhprof \ - --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - if [ ! -f /tmp/xhprof ];then - mkdir -p /tmp/xhprof - chown -R www:www /tmp/xhprof - 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 - echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/54/imagemagick.sh b/plugins/php/versions/54/imagemagick.sh deleted file mode 100755 index da023947c..000000000 --- a/plugins/php/versions/54/imagemagick.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=imagick -LIBV=3.5.1 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/54/ioncube.sh b/plugins/php/versions/54/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php/versions/54/ioncube.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=ioncube -LIBV=0 -sysName=`uname` -actionType=$1 -version=$2 -IC_VERSION=${version:0:1}.${version:1:2} - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} -extFile=${extDir}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then - wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz - cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz - fi - cd $php_lib/ioncube - - cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/54/redis.sh b/plugins/php/versions/54/redis.sh deleted file mode 100755 index 565e18c21..000000000 --- a/plugins/php/versions/54/redis.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/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=redis -LIBV=4.2.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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_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 - - 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 - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/54/seaslog.sh b/plugins/php/versions/54/seaslog.sh deleted file mode 100755 index 8ec22536d..000000000 --- a/plugins/php/versions/54/seaslog.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/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=SeasLog -_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') -LIBV=2.0.2 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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_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 - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, Plese select other version!" - return - fi - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/54/xdebug.sh b/plugins/php/versions/54/xdebug.sh deleted file mode 100755 index 0fda414d9..000000000 --- a/plugins/php/versions/54/xdebug.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/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=xdebug -LIBV=2.2.7 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - - 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 \ - && make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/54/xhprof.sh b/plugins/php/versions/54/xhprof.sh deleted file mode 100755 index 5738efb1d..000000000 --- a/plugins/php/versions/54/xhprof.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/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=xhprof -LIBV=0.9.4 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - cd ${LIBNAME}-${LIBV}/extension - $serverPath/php/$version/bin/phpize - ./configure --enable-xhprof --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - if [ ! -f /tmp/xhprof ];then - mkdir -p /tmp/xhprof - chown -R www:www /tmp/xhprof - 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 - echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/imagemagick.sh b/plugins/php/versions/55/imagemagick.sh deleted file mode 100755 index da023947c..000000000 --- a/plugins/php/versions/55/imagemagick.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=imagick -LIBV=3.5.1 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/ioncube.sh b/plugins/php/versions/55/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php/versions/55/ioncube.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=ioncube -LIBV=0 -sysName=`uname` -actionType=$1 -version=$2 -IC_VERSION=${version:0:1}.${version:1:2} - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} -extFile=${extDir}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then - wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz - cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz - fi - cd $php_lib/ioncube - - cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/opcache.sh b/plugins/php/versions/55/opcache.sh deleted file mode 100755 index 500a12334..000000000 --- a/plugins/php/versions/55/opcache.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/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=opcache -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[opcache]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini - echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini - echo "opcache.max_accelerated_files=4000" >> $serverPath/php/$version/etc/php.ini - echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini - echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/redis.sh b/plugins/php/versions/55/redis.sh deleted file mode 100755 index b82d6bc8a..000000000 --- a/plugins/php/versions/55/redis.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/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=redis -LIBV=4.2.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -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_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/seaslog.sh b/plugins/php/versions/55/seaslog.sh deleted file mode 100755 index 7add41d9d..000000000 --- a/plugins/php/versions/55/seaslog.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/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=SeasLog -_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') -LIBV=2.0.2 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, Plese select other version!" - return - fi - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/xdebug.sh b/plugins/php/versions/55/xdebug.sh deleted file mode 100755 index 846b921db..000000000 --- a/plugins/php/versions/55/xdebug.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/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=xdebug -LIBV=2.2.7 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-memcache --with-zlib-dir=$serverPath/lib/zlib \ - --with-libmemcached-dir=$serverPath/lib/libmemcached - make && make install && make clean - - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/xhprof.sh b/plugins/php/versions/55/xhprof.sh deleted file mode 100755 index 9f6fec1d5..000000000 --- a/plugins/php/versions/55/xhprof.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/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=xhprof -LIBV=0.9.4 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV}/extension - - $serverPath/php/$version/bin/phpize - ./configure --enable-xhprof --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - if [ ! -f /tmp/xhprof ];then - mkdir -p /tmp/xhprof - chown -R www:www /tmp/xhprof - 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 - echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/imagemagick.sh b/plugins/php/versions/56/imagemagick.sh deleted file mode 100755 index da023947c..000000000 --- a/plugins/php/versions/56/imagemagick.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=imagick -LIBV=3.5.1 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/ioncube.sh b/plugins/php/versions/56/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php/versions/56/ioncube.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=ioncube -LIBV=0 -sysName=`uname` -actionType=$1 -version=$2 -IC_VERSION=${version:0:1}.${version:1:2} - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} -extFile=${extDir}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then - wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz - cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz - fi - cd $php_lib/ioncube - - cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/opcache.sh b/plugins/php/versions/56/opcache.sh deleted file mode 100755 index a4227c20e..000000000 --- a/plugins/php/versions/56/opcache.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/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=opcache -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[opcache]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini - echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini - echo "opcache.max_accelerated_files=4000" >> $serverPath/php/$version/etc/php.ini - echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini - echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/redis.sh b/plugins/php/versions/56/redis.sh deleted file mode 100755 index 252c7e942..000000000 --- a/plugins/php/versions/56/redis.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/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=redis -LIBV=4.2.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/seaslog.sh b/plugins/php/versions/56/seaslog.sh deleted file mode 100755 index 190e266e4..000000000 --- a/plugins/php/versions/56/seaslog.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/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=SeasLog -_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') -LIBV=2.0.2 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, Plese select other version!" - return - fi - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/xdebug.sh b/plugins/php/versions/56/xdebug.sh deleted file mode 100755 index 681ee3495..000000000 --- a/plugins/php/versions/56/xdebug.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/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=xdebug -LIBV=2.2.7 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/xhprof.sh b/plugins/php/versions/56/xhprof.sh deleted file mode 100755 index 43c9fac63..000000000 --- a/plugins/php/versions/56/xhprof.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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=xhprof -LIBV=0.9.4 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV}/extension - - $serverPath/php/$version/bin/phpize - ./configure --enable-xhprof \ - --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - if [ ! -f /tmp/xhprof ];then - mkdir -p /tmp/xhprof - chown -R www:www /tmp/xhprof - 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 - echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/ioncube.sh b/plugins/php/versions/70/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php/versions/70/ioncube.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=ioncube -LIBV=0 -sysName=`uname` -actionType=$1 -version=$2 -IC_VERSION=${version:0:1}.${version:1:2} - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} -extFile=${extDir}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then - wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz - cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz - fi - cd $php_lib/ioncube - - cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/memcached.sh b/plugins/php/versions/70/memcached.sh deleted file mode 100755 index 264d9dbcd..000000000 --- a/plugins/php/versions/70/memcached.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/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=memcached -LIBV=3.1.3 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-memcached \ - --disable-memcached-sasl && \ - make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/mongodb.sh b/plugins/php/versions/70/mongodb.sh deleted file mode 100755 index cfb2e8c11..000000000 --- a/plugins/php/versions/70/mongodb.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=mongodb -LIBV=1.7.5 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/opcache.sh b/plugins/php/versions/70/opcache.sh deleted file mode 100755 index 0547b1b76..000000000 --- a/plugins/php/versions/70/opcache.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/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=opcache -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[opcache]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini - echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini - echo "opcache.max_accelerated_files=4000" >> $serverPath/php/$version/etc/php.ini - echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini - echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/redis.sh b/plugins/php/versions/70/redis.sh deleted file mode 100755 index 2afdbe684..000000000 --- a/plugins/php/versions/70/redis.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/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=redis -LIBV=4.2.0 -sysName=`uname` -actionType=$1 -version=$2 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/seaslog.sh b/plugins/php/versions/70/seaslog.sh deleted file mode 100755 index aa04d92d2..000000000 --- a/plugins/php/versions/70/seaslog.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/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=SeasLog -_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') -LIBV=2.0.2 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, Plese select other version!" - return - fi - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 deleted file mode 100755 index 9d34a2760..000000000 --- a/plugins/php/versions/70/solr.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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.5.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS - make && make install && make clean - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/xhprof.sh b/plugins/php/versions/70/xhprof.sh deleted file mode 100755 index 6c0f5eeb4..000000000 --- a/plugins/php/versions/70/xhprof.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/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=xhprof -LIBV=2.1.2 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV}/extension - - $serverPath/php/$version/bin/phpize - ./configure --enable-xhprof \ - --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - if [ ! -f /tmp/xhprof ];then - mkdir -p /tmp/xhprof - chown -R www:www /tmp/xhprof - 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 - echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/yac.sh b/plugins/php/versions/70/yac.sh deleted file mode 100755 index 3ff9d3bff..000000000 --- a/plugins/php/versions/70/yac.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/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 - - -actionType=$1 -version=$2 -sysName=`uname` - -LIBNAME=yac -LIBV=2.3.1 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装yaf,请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/yaf.sh b/plugins/php/versions/70/yaf.sh deleted file mode 100755 index b5713edeb..000000000 --- a/plugins/php/versions/70/yaf.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/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 - - -actionType=$1 -version=$2 - -sysName=`uname` - -LIBNAME=yaf -LIBV=3.2.2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/yar.sh b/plugins/php/versions/70/yar.sh deleted file mode 100755 index f75185834..000000000 --- a/plugins/php/versions/70/yar.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/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=yar -LIBV=2.1.2 - -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then - LIBV='2.0.5' -fi - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-curl=$serverPath/lib/curl - make && make install && make clean - - fi - - 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 - echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, Plese select other version!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/zip.sh b/plugins/php/versions/70/zip.sh deleted file mode 100755 index 4606559ba..000000000 --- a/plugins/php/versions/70/zip.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zip -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-zip - - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/imagemagick.sh b/plugins/php/versions/71/imagemagick.sh deleted file mode 100755 index 6c9688423..000000000 --- a/plugins/php/versions/71/imagemagick.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=imagick -LIBV=3.7.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/ioncube.sh b/plugins/php/versions/71/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php/versions/71/ioncube.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=ioncube -LIBV=0 -sysName=`uname` -actionType=$1 -version=$2 -IC_VERSION=${version:0:1}.${version:1:2} - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} -extFile=${extDir}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then - wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz - cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz - fi - cd $php_lib/ioncube - - cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/memcached.sh b/plugins/php/versions/71/memcached.sh deleted file mode 100755 index cd31d0110..000000000 --- a/plugins/php/versions/71/memcached.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/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=memcached -LIBV=3.1.3 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-memcached \ - --disable-memcached-sasl && \ - make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/mongodb.sh b/plugins/php/versions/71/mongodb.sh deleted file mode 100755 index ec61dcc33..000000000 --- a/plugins/php/versions/71/mongodb.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=mongodb -LIBV=1.11.1 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/opcache.sh b/plugins/php/versions/71/opcache.sh deleted file mode 100755 index a4227c20e..000000000 --- a/plugins/php/versions/71/opcache.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/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=opcache -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[opcache]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini - echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini - echo "opcache.max_accelerated_files=4000" >> $serverPath/php/$version/etc/php.ini - echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini - echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/redis.sh b/plugins/php/versions/71/redis.sh deleted file mode 100755 index 17485ef91..000000000 --- a/plugins/php/versions/71/redis.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/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=redis -LIBV=4.2.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/seaslog.sh b/plugins/php/versions/71/seaslog.sh deleted file mode 100755 index 4ce5de4b2..000000000 --- a/plugins/php/versions/71/seaslog.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/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=SeasLog -_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') -LIBV=2.0.2 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, Plese select other version!" - return - fi - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 deleted file mode 100755 index 3acb559de..000000000 --- a/plugins/php/versions/71/solr.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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.5.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS - make && make install && make clean - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/yac.sh b/plugins/php/versions/71/yac.sh deleted file mode 100755 index d3001a111..000000000 --- a/plugins/php/versions/71/yac.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/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 - - -actionType=$1 -version=$2 - -LIBNAME=yac -LIBV=2.3.1 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装yaf,请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/yaf.sh b/plugins/php/versions/71/yaf.sh deleted file mode 100755 index d0425d0bc..000000000 --- a/plugins/php/versions/71/yaf.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=yaf -LIBV=3.3.5 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/yar.sh b/plugins/php/versions/71/yar.sh deleted file mode 100755 index 21ccf3142..000000000 --- a/plugins/php/versions/71/yar.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/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=yar -LIBV=2.1.2 - -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then - LIBV=2.0.5 -fi - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - echo "./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-curl=$serverPath/php/curl" - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-curl=$serverPath/lib/curl - make && make install && make clean - - fi - - 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 - echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, Plese select other version!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/zip.sh b/plugins/php/versions/71/zip.sh deleted file mode 100755 index 4606559ba..000000000 --- a/plugins/php/versions/71/zip.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zip -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-zip - - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/zlib.sh b/plugins/php/versions/71/zlib.sh deleted file mode 100755 index becdb182d..000000000 --- a/plugins/php/versions/71/zlib.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zlib -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - if [ ! -f "config.m4" ];then - mv config0.m4 config.m4 - fi - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/imagemagick.sh b/plugins/php/versions/72/imagemagick.sh deleted file mode 100755 index 6c9688423..000000000 --- a/plugins/php/versions/72/imagemagick.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=imagick -LIBV=3.7.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/ioncube.sh b/plugins/php/versions/72/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php/versions/72/ioncube.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=ioncube -LIBV=0 -sysName=`uname` -actionType=$1 -version=$2 -IC_VERSION=${version:0:1}.${version:1:2} - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} -extFile=${extDir}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then - wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz - cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz - fi - cd $php_lib/ioncube - - cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/mcrypt.sh b/plugins/php/versions/72/mcrypt.sh deleted file mode 100755 index d37a096b5..000000000 --- a/plugins/php/versions/72/mcrypt.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/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 - - -actionType=$1 -version=$2 - -LIBNAME=mcrypt -LIBV=1.0.4 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/memcached.sh b/plugins/php/versions/72/memcached.sh deleted file mode 100755 index 9b8a4e815..000000000 --- a/plugins/php/versions/72/memcached.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/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=memcached -LIBV=3.1.3 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-memcachedm\ - --disable-memcached-sasl && \ - make clean && make && make install && make clean - - cd $php_lib - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/mongodb.sh b/plugins/php/versions/72/mongodb.sh deleted file mode 100755 index f8ab90551..000000000 --- a/plugins/php/versions/72/mongodb.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/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=mongodb -LIBV=1.11.1 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - cd $php_lib - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/opcache.sh b/plugins/php/versions/72/opcache.sh deleted file mode 100755 index 0547b1b76..000000000 --- a/plugins/php/versions/72/opcache.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/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=opcache -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[opcache]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini - echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini - echo "opcache.max_accelerated_files=4000" >> $serverPath/php/$version/etc/php.ini - echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini - echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/redis.sh b/plugins/php/versions/72/redis.sh deleted file mode 100755 index fe782a92c..000000000 --- a/plugins/php/versions/72/redis.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/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=redis -LIBV=4.2.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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_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 - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/seaslog.sh b/plugins/php/versions/72/seaslog.sh deleted file mode 100755 index dde11a1a1..000000000 --- a/plugins/php/versions/72/seaslog.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/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=SeasLog -LIBV=2.0.2 -sysName=`uname` -actionType=$1 -version=$2 -_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_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 - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, Plese select other version!" - return - fi - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 deleted file mode 100755 index 2e6f508d4..000000000 --- a/plugins/php/versions/72/solr.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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.5.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_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 - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - - cd $php_lib/${LIBNAME}-${LIBV} - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS - make && make install && make clean - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/xdebug.sh b/plugins/php/versions/72/xdebug.sh deleted file mode 100755 index 6e46ded96..000000000 --- a/plugins/php/versions/72/xdebug.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/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=xdebug -LIBV=2.7.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - - 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 - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/xhprof.sh b/plugins/php/versions/72/xhprof.sh deleted file mode 100755 index 6c64c6d5f..000000000 --- a/plugins/php/versions/72/xhprof.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/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=xhprof -LIBV=2.3.5 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV}/extension - - $serverPath/php/$version/bin/phpize - ./configure --enable-xhprof \ - --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - if [ ! -f /tmp/xhprof ];then - mkdir -p /tmp/xhprof - chown -R www:www /tmp/xhprof - 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 - echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/yaf.sh b/plugins/php/versions/72/yaf.sh deleted file mode 100755 index 2e0683075..000000000 --- a/plugins/php/versions/72/yaf.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/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 - - -actionType=$1 -version=$2 - -LIBNAME=yaf -LIBV=3.3.5 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/yar.sh b/plugins/php/versions/72/yar.sh deleted file mode 100755 index 0f0aa9c65..000000000 --- a/plugins/php/versions/72/yar.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/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=yar -LIBV=2.1.2 - -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - - -if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then - LIBV='2.0.5' -fi - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-curl=$serverPath/lib/curl - make && make install && make clean - fi - - 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 - echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, Plese select other version!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/zip.sh b/plugins/php/versions/72/zip.sh deleted file mode 100755 index 4606559ba..000000000 --- a/plugins/php/versions/72/zip.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zip -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-zip - - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/zlib.sh b/plugins/php/versions/72/zlib.sh deleted file mode 100755 index becdb182d..000000000 --- a/plugins/php/versions/72/zlib.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zlib -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - if [ ! -f "config.m4" ];then - mv config0.m4 config.m4 - fi - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/imagemagick.sh b/plugins/php/versions/73/imagemagick.sh deleted file mode 100755 index 6c9688423..000000000 --- a/plugins/php/versions/73/imagemagick.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=imagick -LIBV=3.7.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/ioncube.sh b/plugins/php/versions/73/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php/versions/73/ioncube.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=ioncube -LIBV=0 -sysName=`uname` -actionType=$1 -version=$2 -IC_VERSION=${version:0:1}.${version:1:2} - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} -extFile=${extDir}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then - wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz - cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz - fi - cd $php_lib/ioncube - - cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/mcrypt.sh b/plugins/php/versions/73/mcrypt.sh deleted file mode 100755 index d37a096b5..000000000 --- a/plugins/php/versions/73/mcrypt.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/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 - - -actionType=$1 -version=$2 - -LIBNAME=mcrypt -LIBV=1.0.4 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/memcached.sh b/plugins/php/versions/73/memcached.sh deleted file mode 100755 index 7867c851d..000000000 --- a/plugins/php/versions/73/memcached.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/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=memcached -LIBV=3.1.3 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-memcached \ - --disable-memcached-sasl && \ - make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/mongodb.sh b/plugins/php/versions/73/mongodb.sh deleted file mode 100755 index 9a9c3180b..000000000 --- a/plugins/php/versions/73/mongodb.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/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=mongodb -LIBV=1.11.1 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/opcache.sh b/plugins/php/versions/73/opcache.sh deleted file mode 100755 index 73d59f1ed..000000000 --- a/plugins/php/versions/73/opcache.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/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=opcache -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[opcache]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini - echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini - echo "opcache.max_accelerated_files=4000" >> $serverPath/php/$version/etc/php.ini - echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini - echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/redis.sh b/plugins/php/versions/73/redis.sh deleted file mode 100755 index 723f604f2..000000000 --- a/plugins/php/versions/73/redis.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=redis -LIBV=4.2.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/seaslog.sh b/plugins/php/versions/73/seaslog.sh deleted file mode 100755 index bd0ad3c7e..000000000 --- a/plugins/php/versions/73/seaslog.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/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=SeasLog -_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') -LIBV=2.0.2 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, Plese select other version!" - return - fi - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 deleted file mode 100755 index 7a9186002..000000000 --- a/plugins/php/versions/73/solr.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/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.5.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - - cd $php_lib/${LIBNAME}-${LIBV} - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS - make && make install && make clean - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/swoole.sh b/plugins/php/versions/73/swoole.sh deleted file mode 100755 index 9d86a1171..000000000 --- a/plugins/php/versions/73/swoole.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=swoole -LIBV=4.8.10 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -d "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-openssl \ - --with-openssl-dir=$serverPath/lib/openssl \ - --enable-sockets - make && make install && make clean - - fi - - while [[ ! -f "$extFile" ]]; - do - echo -e ".\c" - sleep 0.5 - if [ ! -f "$extFile" ];then - echo "ERROR!" - fi - let n+=1 - if [ $n -gt 8 ];then - echo "WAIT " $n "TIMES FAIL!" - return; - fi - done - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/xdebug.sh b/plugins/php/versions/73/xdebug.sh deleted file mode 100755 index 7355cf3d3..000000000 --- a/plugins/php/versions/73/xdebug.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/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=xdebug -LIBV=2.8.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/xhprof.sh b/plugins/php/versions/73/xhprof.sh deleted file mode 100755 index 6c64c6d5f..000000000 --- a/plugins/php/versions/73/xhprof.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/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=xhprof -LIBV=2.3.5 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV}/extension - - $serverPath/php/$version/bin/phpize - ./configure --enable-xhprof \ - --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - if [ ! -f /tmp/xhprof ];then - mkdir -p /tmp/xhprof - chown -R www:www /tmp/xhprof - 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 - echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/yac.sh b/plugins/php/versions/73/yac.sh deleted file mode 100755 index d1fb22520..000000000 --- a/plugins/php/versions/73/yac.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=yac -LIBV=2.3.1 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "$isInstall" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - cd .. - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装yaf,请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/yaf.sh b/plugins/php/versions/73/yaf.sh deleted file mode 100755 index 72ab38df2..000000000 --- a/plugins/php/versions/73/yaf.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=yaf -LIBV=3.3.5 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/yar.sh b/plugins/php/versions/73/yar.sh deleted file mode 100755 index 7e48bea34..000000000 --- a/plugins/php/versions/73/yar.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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=yar -LIBV=2.1.2 - -actionType=$1 -version=$2 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-curl=$serverPath/lib/curl - make && make install && make clean - fi - - 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 - echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, Plese select other version!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/zip.sh b/plugins/php/versions/73/zip.sh deleted file mode 100755 index 4606559ba..000000000 --- a/plugins/php/versions/73/zip.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zip -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-zip - - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/zlib.sh b/plugins/php/versions/73/zlib.sh deleted file mode 100755 index becdb182d..000000000 --- a/plugins/php/versions/73/zlib.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zlib -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - if [ ! -f "config.m4" ];then - mv config0.m4 config.m4 - fi - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/imagemagick.sh b/plugins/php/versions/74/imagemagick.sh deleted file mode 100755 index 6c9688423..000000000 --- a/plugins/php/versions/74/imagemagick.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=imagick -LIBV=3.7.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/ioncube.sh b/plugins/php/versions/74/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php/versions/74/ioncube.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=ioncube -LIBV=0 -sysName=`uname` -actionType=$1 -version=$2 -IC_VERSION=${version:0:1}.${version:1:2} - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} -extFile=${extDir}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then - wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz - cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz - fi - cd $php_lib/ioncube - - cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/mongodb.sh b/plugins/php/versions/74/mongodb.sh deleted file mode 100755 index 1441e172f..000000000 --- a/plugins/php/versions/74/mongodb.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=mongodb -LIBV=1.11.1 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/opcache.sh b/plugins/php/versions/74/opcache.sh deleted file mode 100755 index d0994e3c7..000000000 --- a/plugins/php/versions/74/opcache.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/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=opcache -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[opcache]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini - echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini - echo "opcache.max_accelerated_files=400000" >> $serverPath/php/$version/etc/php.ini - echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini - echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/seaslog.sh b/plugins/php/versions/74/seaslog.sh deleted file mode 100755 index 51a6e43c6..000000000 --- a/plugins/php/versions/74/seaslog.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/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=SeasLog -_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') -LIBV=2.1.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, Plese select other version!" - return - fi - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/swoole.sh b/plugins/php/versions/74/swoole.sh deleted file mode 100755 index abd4a3676..000000000 --- a/plugins/php/versions/74/swoole.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=swoole -LIBV=4.8.10 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_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 - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-openssl --with-openssl-dir=$serverPath/lib/openssl \ - --enable-sockets - make clean && make && make install && make clean - - fi - - while [[ ! -f "$extFile" ]]; - do - echo -e ".\c" - sleep 0.5 - if [ ! -f "$extFile" ];then - echo "ERROR!" - fi - let n+=1 - if [ $n -gt 8 ];then - echo "WAIT " $n "TIMES FAIL!" - return; - fi - done - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/xhprof.sh b/plugins/php/versions/74/xhprof.sh deleted file mode 100755 index 8751501bd..000000000 --- a/plugins/php/versions/74/xhprof.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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=xhprof -LIBV=2.3.5 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV}/extension - - $serverPath/php/$version/bin/phpize - ./configure --enable-xhprof \ - --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - if [ ! -f /tmp/xhprof ];then - mkdir -p /tmp/xhprof - chown -R www:www /tmp/xhprof - 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 - echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/yac.sh b/plugins/php/versions/74/yac.sh deleted file mode 100755 index d1fb22520..000000000 --- a/plugins/php/versions/74/yac.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=yac -LIBV=2.3.1 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "$isInstall" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - cd .. - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装yaf,请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/yaf.sh b/plugins/php/versions/74/yaf.sh deleted file mode 100755 index 72ab38df2..000000000 --- a/plugins/php/versions/74/yaf.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=yaf -LIBV=3.3.5 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/yar.sh b/plugins/php/versions/74/yar.sh deleted file mode 100755 index bd7adc8b8..000000000 --- a/plugins/php/versions/74/yar.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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=yar -LIBV=2.1.2 - -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-curl=$serverPath/lib/curl - make && make install && make clean - fi - - 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 - echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, Plese select other version!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/zip.sh b/plugins/php/versions/74/zip.sh deleted file mode 100755 index 4606559ba..000000000 --- a/plugins/php/versions/74/zip.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zip -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-zip - - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/zlib.sh b/plugins/php/versions/74/zlib.sh deleted file mode 100755 index becdb182d..000000000 --- a/plugins/php/versions/74/zlib.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zlib -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - if [ ! -f "config.m4" ];then - mv config0.m4 config.m4 - fi - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/gd.sh b/plugins/php/versions/80/gd.sh deleted file mode 100755 index f4939fe7e..000000000 --- a/plugins/php/versions/80/gd.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=gd -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-gd \ - --with-webp \ - --with-xpm \ - --with-jpeg \ - --with-freetype \ - --enable-gd-jis-conv - - make clean && make && make install && make clean - - fi - - 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} restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/imagemagick.sh b/plugins/php/versions/80/imagemagick.sh deleted file mode 100755 index 6c9688423..000000000 --- a/plugins/php/versions/80/imagemagick.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=imagick -LIBV=3.7.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/mcrypt.sh b/plugins/php/versions/80/mcrypt.sh deleted file mode 100755 index d37a096b5..000000000 --- a/plugins/php/versions/80/mcrypt.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/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 - - -actionType=$1 -version=$2 - -LIBNAME=mcrypt -LIBV=1.0.4 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/memcached.sh b/plugins/php/versions/80/memcached.sh deleted file mode 100755 index 071742fae..000000000 --- a/plugins/php/versions/80/memcached.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/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=memcached -LIBV=3.1.5 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - rm -rf $php_lib/${LIBNAME}-${LIBV} - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - sed -i '_bak' "3237,3238s#ulong#zend_ulong#g" $php_lib/${LIBNAME}-${LIBV}/php_memcached.c - $serverPath/php/$version/bin/phpize - - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-memcached \ - --disable-memcached-sasl && \ - make clean && make && make install && make clean - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/mongodb.sh b/plugins/php/versions/80/mongodb.sh deleted file mode 100755 index 1441e172f..000000000 --- a/plugins/php/versions/80/mongodb.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=mongodb -LIBV=1.11.1 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/opcache.sh b/plugins/php/versions/80/opcache.sh deleted file mode 100755 index 2836741a6..000000000 --- a/plugins/php/versions/80/opcache.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/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=opcache -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[opcache]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini - echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini - echo "opcache.max_accelerated_files=4000" >> $serverPath/php/$version/etc/php.ini - echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini - echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini - echo "opcache.jit=1205" >> $serverPath/php/$version/etc/php.ini - echo "opcache.jit_buffer_size=64M" >> $serverPath/php/$version/etc/php.ini - - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/redis.sh b/plugins/php/versions/80/redis.sh deleted file mode 100755 index cb1eb9ac6..000000000 --- a/plugins/php/versions/80/redis.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/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=redis -LIBV=5.3.3 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/solr.sh b/plugins/php/versions/80/solr.sh deleted file mode 100755 index b6fcb1250..000000000 --- a/plugins/php/versions/80/solr.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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.5.1 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_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 - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - - cd $php_lib/${LIBNAME}-${LIBV} - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS - make && make install && make clean - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/swoole.sh b/plugins/php/versions/80/swoole.sh deleted file mode 100755 index 10085eced..000000000 --- a/plugins/php/versions/80/swoole.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - - -LIBNAME=swoole -LIBV=4.8.10 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_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 - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-openssl --with-openssl-dir=$serverPath/lib/openssl \ - --enable-sockets - make clean && make && make install && make clean - - fi - - while [[ ! -f "$extFile" ]]; - do - echo -e ".\c" - sleep 0.5 - if [ ! -f "$extFile" ];then - echo "ERROR!" - fi - let n+=1 - if [ $n -gt 8 ];then - echo "WAIT " $n "TIMES FAIL!" - return; - fi - done - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/xdebug.sh b/plugins/php/versions/80/xdebug.sh deleted file mode 100755 index 902e1727b..000000000 --- a/plugins/php/versions/80/xdebug.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/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=xdebug -LIBV=3.0.2 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/xhprof.sh b/plugins/php/versions/80/xhprof.sh deleted file mode 100755 index 6c64c6d5f..000000000 --- a/plugins/php/versions/80/xhprof.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/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=xhprof -LIBV=2.3.5 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV}/extension - - $serverPath/php/$version/bin/phpize - ./configure --enable-xhprof \ - --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - if [ ! -f /tmp/xhprof ];then - mkdir -p /tmp/xhprof - chown -R www:www /tmp/xhprof - 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 - echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/yac.sh b/plugins/php/versions/80/yac.sh deleted file mode 100755 index d1fb22520..000000000 --- a/plugins/php/versions/80/yac.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=yac -LIBV=2.3.1 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "$isInstall" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - cd .. - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装yaf,请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/yar.sh b/plugins/php/versions/80/yar.sh deleted file mode 100755 index b697cc354..000000000 --- a/plugins/php/versions/80/yar.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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=yar -LIBV=2.2.0 - -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-curl=$serverPath/lib/curl - make && make install && make clean - fi - - 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 - echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, Plese select other version!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/80/zlib.sh b/plugins/php/versions/80/zlib.sh deleted file mode 100755 index becdb182d..000000000 --- a/plugins/php/versions/80/zlib.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zlib -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - if [ ! -f "config.m4" ];then - mv config0.m4 config.m4 - fi - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/gd.sh b/plugins/php/versions/81/gd.sh deleted file mode 100755 index f4939fe7e..000000000 --- a/plugins/php/versions/81/gd.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=gd -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-gd \ - --with-webp \ - --with-xpm \ - --with-jpeg \ - --with-freetype \ - --enable-gd-jis-conv - - make clean && make && make install && make clean - - fi - - 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} restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/imagemagick.sh b/plugins/php/versions/81/imagemagick.sh deleted file mode 100755 index 6c9688423..000000000 --- a/plugins/php/versions/81/imagemagick.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/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=imagick -LIBV=3.7.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - && make clean && make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/mcrypt.sh b/plugins/php/versions/81/mcrypt.sh deleted file mode 100755 index d37a096b5..000000000 --- a/plugins/php/versions/81/mcrypt.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/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 - - -actionType=$1 -version=$2 - -LIBNAME=mcrypt -LIBV=1.0.4 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/memcached.sh b/plugins/php/versions/81/memcached.sh deleted file mode 100755 index 2d5962c37..000000000 --- a/plugins/php/versions/81/memcached.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/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=memcached -LIBV=3.2.0 -sysName=`uname` -actionType=$1 -version=$2 -extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20210902/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - rm -rf $php_lib/${LIBNAME}-${LIBV} - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - sed -i '_bak' "3237,3238s#ulong#zend_ulong#g" $php_lib/${LIBNAME}-${LIBV}/php_memcached.c - $serverPath/php/$version/bin/phpize - - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-memcached \ - --disable-memcached-sasl && \ - make clean && make && make install && make clean - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/redis.sh b/plugins/php/versions/81/redis.sh deleted file mode 100755 index 33d1147fb..000000000 --- a/plugins/php/versions/81/redis.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/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=redis -LIBV=5.3.3 -sysName=`uname` -actionType=$1 -version=$2 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/seaslog.sh b/plugins/php/versions/81/seaslog.sh deleted file mode 100755 index 5a685f1e3..000000000 --- a/plugins/php/versions/81/seaslog.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/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=SeasLog -_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') -LIBV=2.2.0 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - sleep 1 - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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-$version not install ${LIBNAME}, Plese select other version!" - return - fi - _LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/solr.sh b/plugins/php/versions/81/solr.sh deleted file mode 100755 index b6fcb1250..000000000 --- a/plugins/php/versions/81/solr.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/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.5.1 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -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 - - OPTIONS='' - if [ $sysName == 'Darwin' ]; then - OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" - fi - - php_lib=$sourcePath/php_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 - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - - cd $php_lib/${LIBNAME}-${LIBV} - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS - make && make install && make clean - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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 ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/swoole.sh b/plugins/php/versions/81/swoole.sh deleted file mode 100755 index 10085eced..000000000 --- a/plugins/php/versions/81/swoole.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - - -LIBNAME=swoole -LIBV=4.8.10 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_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 - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-openssl --with-openssl-dir=$serverPath/lib/openssl \ - --enable-sockets - make clean && make && make install && make clean - - fi - - while [[ ! -f "$extFile" ]]; - do - echo -e ".\c" - sleep 0.5 - if [ ! -f "$extFile" ];then - echo "ERROR!" - fi - let n+=1 - if [ $n -gt 8 ];then - echo "WAIT " $n "TIMES FAIL!" - return; - fi - done - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/xdebug.sh b/plugins/php/versions/81/xdebug.sh deleted file mode 100755 index 902e1727b..000000000 --- a/plugins/php/versions/81/xdebug.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/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=xdebug -LIBV=3.0.2 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - echo "" >> $serverPath/php/$version/etc/php.ini - echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini - echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/xhprof.sh b/plugins/php/versions/81/xhprof.sh deleted file mode 100755 index 6c64c6d5f..000000000 --- a/plugins/php/versions/81/xhprof.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/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=xhprof -LIBV=2.3.5 -sysName=`uname` -actionType=$1 -version=$2 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV}/extension - - $serverPath/php/$version/bin/phpize - ./configure --enable-xhprof \ - --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return - fi - - if [ ! -f /tmp/xhprof ];then - mkdir -p /tmp/xhprof - chown -R www:www /tmp/xhprof - 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 - echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$version not install ${LIBNAME}, 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/yac.sh b/plugins/php/versions/81/yac.sh deleted file mode 100755 index d1fb22520..000000000 --- a/plugins/php/versions/81/yac.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=yac -LIBV=2.3.1 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - - -Install_lib() -{ - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "$isInstall" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - - if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - cd .. - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php$version 未安装yaf,请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/yaf.sh b/plugins/php/versions/81/yaf.sh deleted file mode 100755 index ef2a6b047..000000000 --- a/plugins/php/versions/81/yaf.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/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 - -actionType=$1 -version=$2 - -LIBNAME=yaf -LIBV=3.3.5 - - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - php_lib=$sourcePath/php_lib - mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi - cd $php_lib/${LIBNAME}-${LIBV} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - fi - - 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 - echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini - - rm -f $extFile - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/zip.sh b/plugins/php/versions/81/zip.sh deleted file mode 100755 index dc877acbe..000000000 --- a/plugins/php/versions/81/zip.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zip -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -export PKG_CONFIG_PATH=/www/server/lib/libzip/lib/pkgconfig - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-zip - - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/81/zlib.sh b/plugins/php/versions/81/zlib.sh deleted file mode 100755 index becdb182d..000000000 --- a/plugins/php/versions/81/zlib.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` - -appPath=$(dirname "$curPath") - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -sourcePath=${serverPath}/source/php - -actionType=$1 -version=$2 - -LIBNAME=zlib -LIBV=0 - -NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` -extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - -sysName=`uname` -if [ "$sysName" == "Darwin" ];then - BAK='_bak' -else - BAK='' -fi - -Install_lib() -{ - - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` - if [ "${isInstall}" != "" ];then - echo "php-$version 已安装${LIBNAME},请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - - if [ ! -d $sourcePath/php${version}/ext ];then - cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} - fi - - cd $sourcePath/php${version}/ext/${LIBNAME} - - if [ ! -f "config.m4" ];then - mv config0.m4 config.m4 - fi - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config - make && make install && make clean - - fi - - 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 - - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_lib() -{ - if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php-$version 未安装,请选择其它版本!" - return - fi - - if [ ! -f "$extFile" ];then - echo "php-$version 未安装${LIBNAME},请选择其它版本!" - return - fi - - echo $serverPath/php/$version/etc/php.ini - 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 - bash ${rootPath}/plugins/php/versions/lib.sh $version restart - 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/74/gd.sh b/plugins/php/versions/common/gd.sh similarity index 100% rename from plugins/php/versions/74/gd.sh rename to plugins/php/versions/common/gd.sh diff --git a/plugins/php/versions/70/imagemagick.sh b/plugins/php/versions/common/imagemagick.sh similarity index 100% rename from plugins/php/versions/70/imagemagick.sh rename to plugins/php/versions/common/imagemagick.sh diff --git a/plugins/php/versions/52/ioncube.sh b/plugins/php/versions/common/ioncube.sh similarity index 99% rename from plugins/php/versions/52/ioncube.sh rename to plugins/php/versions/common/ioncube.sh index 40a8f5810..55de88e84 100755 --- a/plugins/php/versions/52/ioncube.sh +++ b/plugins/php/versions/common/ioncube.sh @@ -11,6 +11,8 @@ rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php +# support 52-74 + LIBNAME=ioncube LIBV=0 sysName=`uname` diff --git a/plugins/php/versions/74/mcrypt.sh b/plugins/php/versions/common/mcrypt.sh similarity index 99% rename from plugins/php/versions/74/mcrypt.sh rename to plugins/php/versions/common/mcrypt.sh index d37a096b5..fcd062238 100755 --- a/plugins/php/versions/74/mcrypt.sh +++ b/plugins/php/versions/common/mcrypt.sh @@ -15,7 +15,7 @@ actionType=$1 version=$2 LIBNAME=mcrypt -LIBV=1.0.4 +LIBV=1.0.5 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` diff --git a/plugins/php/versions/74/memcached.sh b/plugins/php/versions/common/memcached.sh similarity index 99% rename from plugins/php/versions/74/memcached.sh rename to plugins/php/versions/common/memcached.sh index 7a31cee78..2e95c6d56 100755 --- a/plugins/php/versions/74/memcached.sh +++ b/plugins/php/versions/common/memcached.sh @@ -12,14 +12,13 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=memcached -LIBV=3.1.4 +LIBV=3.2.0 sysName=`uname` actionType=$1 version=$2 NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - if [ "$sysName" == "Darwin" ];then BAK='_bak' else diff --git a/plugins/php/versions/81/mongodb.sh b/plugins/php/versions/common/mongodb.sh similarity index 95% rename from plugins/php/versions/81/mongodb.sh rename to plugins/php/versions/common/mongodb.sh index 1441e172f..e46396955 100755 --- a/plugins/php/versions/81/mongodb.sh +++ b/plugins/php/versions/common/mongodb.sh @@ -12,11 +12,19 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=mongodb -LIBV=1.11.1 +LIBV=1.13.0 sysName=`uname` actionType=$1 version=$2 +if [ "$version" == '71' ];then + LIBV=1.11.1 +fi + +if [ "$version" == '70' ];then + LIBV=1.7.5 +fi + NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so diff --git a/plugins/php/versions/81/opcache.sh b/plugins/php/versions/common/opcache.sh similarity index 100% rename from plugins/php/versions/81/opcache.sh rename to plugins/php/versions/common/opcache.sh diff --git a/plugins/php/versions/74/redis.sh b/plugins/php/versions/common/redis.sh similarity index 95% rename from plugins/php/versions/74/redis.sh rename to plugins/php/versions/common/redis.sh index 5e7616828..97511276e 100755 --- a/plugins/php/versions/74/redis.sh +++ b/plugins/php/versions/common/redis.sh @@ -12,11 +12,20 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=redis -LIBV=5.1.1 +LIBV=5.3.7 sysName=`uname` actionType=$1 version=$2 +if [ "$version" == "52" ];then + LIBV=2.2.7 +elif [ "$version" -lt "70" ];then + LIBV=4.2.0 +else + echo 'ok' +fi + + NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ @@ -39,7 +48,6 @@ Install_lib() php_lib=$sourcePath/php_lib mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz diff --git a/plugins/php/versions/80/seaslog.sh b/plugins/php/versions/common/seaslog.sh similarity index 100% rename from plugins/php/versions/80/seaslog.sh rename to plugins/php/versions/common/seaslog.sh diff --git a/plugins/php/versions/74/solr.sh b/plugins/php/versions/common/solr.sh similarity index 100% rename from plugins/php/versions/74/solr.sh rename to plugins/php/versions/common/solr.sh diff --git a/plugins/php/versions/72/swoole.sh b/plugins/php/versions/common/swoole.sh similarity index 100% rename from plugins/php/versions/72/swoole.sh rename to plugins/php/versions/common/swoole.sh diff --git a/plugins/php/versions/74/xdebug.sh b/plugins/php/versions/common/xdebug.sh similarity index 97% rename from plugins/php/versions/74/xdebug.sh rename to plugins/php/versions/common/xdebug.sh index 92545ce59..4f9e5cfc2 100755 --- a/plugins/php/versions/74/xdebug.sh +++ b/plugins/php/versions/common/xdebug.sh @@ -12,15 +12,18 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=xdebug -LIBV=2.8.0 +LIBV=3.1.5 sysName=`uname` actionType=$1 version=$2 +if [ "$version" -lt "70" ];then + LIBV=2.2.7 +fi + NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - if [ "$sysName" == "Darwin" ];then BAK='_bak' else diff --git a/plugins/php/versions/71/xhprof.sh b/plugins/php/versions/common/xhprof.sh similarity index 98% rename from plugins/php/versions/71/xhprof.sh rename to plugins/php/versions/common/xhprof.sh index f56547b75..e4b97d0ad 100755 --- a/plugins/php/versions/71/xhprof.sh +++ b/plugins/php/versions/common/xhprof.sh @@ -17,6 +17,10 @@ sysName=`uname` actionType=$1 version=$2 +if [ "$version" -lt "70" ];then + LIBV=0.9.4 +fi + NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so @@ -61,7 +65,6 @@ Install_lib() chown -R www:www /tmp/xhprof 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 diff --git a/plugins/php/versions/72/yac.sh b/plugins/php/versions/common/yac.sh similarity index 100% rename from plugins/php/versions/72/yac.sh rename to plugins/php/versions/common/yac.sh diff --git a/plugins/php/versions/80/yaf.sh b/plugins/php/versions/common/yaf.sh similarity index 99% rename from plugins/php/versions/80/yaf.sh rename to plugins/php/versions/common/yaf.sh index ef2a6b047..cba84c5f2 100755 --- a/plugins/php/versions/80/yaf.sh +++ b/plugins/php/versions/common/yaf.sh @@ -11,17 +11,19 @@ rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php + actionType=$1 version=$2 +sysName=`uname` LIBNAME=yaf LIBV=3.3.5 + NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so -sysName=`uname` if [ "$sysName" == "Darwin" ];then BAK='_bak' else @@ -44,12 +46,13 @@ Install_lib() if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi + fi cd $php_lib/${LIBNAME}-${LIBV} $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config make && make install && make clean + fi if [ ! -f "$extFile" ];then diff --git a/plugins/php/versions/81/yar.sh b/plugins/php/versions/common/yar.sh similarity index 99% rename from plugins/php/versions/81/yar.sh rename to plugins/php/versions/common/yar.sh index b697cc354..11b4ad038 100755 --- a/plugins/php/versions/81/yar.sh +++ b/plugins/php/versions/common/yar.sh @@ -11,17 +11,16 @@ rootPath=$(dirname "$rootPath") serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php - -LIBNAME=yar -LIBV=2.2.0 - actionType=$1 version=$2 +LIBNAME=yar +LIBV=2.3.2 + + NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so - sysName=`uname` if [ "$sysName" == "Darwin" ];then BAK='_bak' @@ -42,17 +41,17 @@ Install_lib() php_lib=$sourcePath/php_lib mkdir -p $php_lib - if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - fi + fi cd $php_lib/${LIBNAME}-${LIBV} $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ --with-curl=$serverPath/lib/curl make && make install && make clean + fi if [ ! -f "$extFile" ];then diff --git a/plugins/php/versions/80/zip.sh b/plugins/php/versions/common/zip.sh similarity index 100% rename from plugins/php/versions/80/zip.sh rename to plugins/php/versions/common/zip.sh diff --git a/plugins/php/versions/70/zlib.sh b/plugins/php/versions/common/zlib.sh similarity index 100% rename from plugins/php/versions/70/zlib.sh rename to plugins/php/versions/common/zlib.sh