From c607d6d35d4064f64256aa972d96b925fae3853b Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 7 Jul 2022 14:25:11 +0800 Subject: [PATCH] up --- plugins/php-ya/versions/71/fileinfo.sh | 103 ---------------- plugins/php-ya/versions/71/intl.sh | 101 ---------------- plugins/php-ya/versions/71/ioncube.sh | 96 --------------- plugins/php-ya/versions/71/mcrypt.sh | 97 --------------- plugins/php-ya/versions/71/memcached.sh | 98 --------------- plugins/php-ya/versions/71/mongodb.sh | 96 --------------- plugins/php-ya/versions/71/opcache.sh | 68 ----------- plugins/php-ya/versions/71/openssl.sh | 104 ---------------- plugins/php-ya/versions/71/redis.sh | 97 --------------- plugins/php-ya/versions/71/seaslog.sh | 106 ----------------- plugins/php-ya/versions/71/solr.sh | 103 ---------------- plugins/php-ya/versions/71/swoole.sh | 110 ----------------- plugins/php-ya/versions/71/xdebug.sh | 95 --------------- plugins/php-ya/versions/71/xhprof.sh | 103 ---------------- plugins/php-ya/versions/71/yac.sh | 102 ---------------- plugins/php-ya/versions/71/yaf.sh | 100 ---------------- plugins/php-ya/versions/71/yar.sh | 109 ----------------- plugins/php-ya/versions/71/zip.sh | 100 ---------------- plugins/php-ya/versions/72/exif.sh | 105 ---------------- plugins/php-ya/versions/72/fileinfo.sh | 103 ---------------- plugins/php-ya/versions/72/imagemagick.sh | 96 --------------- plugins/php-ya/versions/72/intl.sh | 101 ---------------- plugins/php-ya/versions/72/ioncube.sh | 96 --------------- plugins/php-ya/versions/72/memcached.sh | 99 ---------------- plugins/php-ya/versions/72/mongodb.sh | 97 --------------- plugins/php-ya/versions/72/opcache.sh | 68 ----------- plugins/php-ya/versions/72/openssl.sh | 104 ---------------- plugins/php-ya/versions/72/pcntl.sh | 96 --------------- plugins/php-ya/versions/72/redis.sh | 97 --------------- plugins/php-ya/versions/72/seaslog.sh | 105 ---------------- plugins/php-ya/versions/72/solr.sh | 103 ---------------- plugins/php-ya/versions/72/swoole.sh | 111 ----------------- plugins/php-ya/versions/72/xdebug.sh | 94 --------------- plugins/php-ya/versions/72/yaf.sh | 101 ---------------- plugins/php-ya/versions/72/yar.sh | 110 ----------------- plugins/php-ya/versions/72/zip.sh | 100 ---------------- plugins/php-ya/versions/72/zlib.sh | 102 ---------------- plugins/php-ya/versions/73/exif.sh | 105 ---------------- plugins/php-ya/versions/73/fileinfo.sh | 103 ---------------- plugins/php-ya/versions/73/imagemagick.sh | 96 --------------- plugins/php-ya/versions/73/intl.sh | 101 ---------------- plugins/php-ya/versions/73/ioncube.sh | 96 --------------- plugins/php-ya/versions/73/mcrypt.sh | 100 ---------------- plugins/php-ya/versions/73/memcached.sh | 97 --------------- plugins/php-ya/versions/73/mongodb.sh | 94 --------------- plugins/php-ya/versions/73/opcache.sh | 69 ----------- plugins/php-ya/versions/73/openssl.sh | 104 ---------------- plugins/php-ya/versions/73/pcntl.sh | 96 --------------- plugins/php-ya/versions/73/redis.sh | 96 --------------- plugins/php-ya/versions/73/seaslog.sh | 105 ---------------- plugins/php-ya/versions/73/solr.sh | 104 ---------------- plugins/php-ya/versions/73/swoole.sh | 110 ----------------- plugins/php-ya/versions/73/xdebug.sh | 95 --------------- plugins/php-ya/versions/73/xhprof.sh | 102 ---------------- plugins/php-ya/versions/73/yac.sh | 99 ---------------- plugins/php-ya/versions/73/yaf.sh | 98 --------------- plugins/php-ya/versions/73/yar.sh | 103 ---------------- plugins/php-ya/versions/73/zip.sh | 100 ---------------- plugins/php-ya/versions/73/zlib.sh | 102 ---------------- plugins/php-ya/versions/74/exif.sh | 105 ---------------- plugins/php-ya/versions/74/fileinfo.sh | 103 ---------------- plugins/php-ya/versions/74/imagemagick.sh | 96 --------------- plugins/php-ya/versions/74/intl.sh | 101 ---------------- plugins/php-ya/versions/74/ioncube.sh | 96 --------------- plugins/php-ya/versions/74/mcrypt.sh | 100 ---------------- plugins/php-ya/versions/74/memcached.sh | 101 ---------------- plugins/php-ya/versions/74/opcache.sh | 68 ----------- plugins/php-ya/versions/74/openssl.sh | 104 ---------------- plugins/php-ya/versions/74/pcntl.sh | 96 --------------- plugins/php-ya/versions/74/redis.sh | 98 --------------- plugins/php-ya/versions/74/seaslog.sh | 105 ---------------- plugins/php-ya/versions/74/swoole.sh | 112 ------------------ plugins/php-ya/versions/74/xdebug.sh | 98 --------------- plugins/php-ya/versions/74/xhprof.sh | 103 ---------------- plugins/php-ya/versions/74/yac.sh | 99 ---------------- plugins/php-ya/versions/74/yaf.sh | 98 --------------- plugins/php-ya/versions/74/yar.sh | 103 ---------------- plugins/php-ya/versions/74/zip.sh | 100 ---------------- plugins/php-ya/versions/74/zlib.sh | 102 ---------------- plugins/php-ya/versions/80/exif.sh | 105 ---------------- plugins/php-ya/versions/80/fileinfo.sh | 103 ---------------- plugins/php-ya/versions/80/gd.sh | 103 ---------------- plugins/php-ya/versions/80/imagemagick.sh | 96 --------------- plugins/php-ya/versions/80/intl.sh | 101 ---------------- plugins/php-ya/versions/80/mcrypt.sh | 100 ---------------- plugins/php-ya/versions/80/memcached.sh | 101 ---------------- plugins/php-ya/versions/80/mongodb.sh | 96 --------------- plugins/php-ya/versions/80/opcache.sh | 71 ----------- plugins/php-ya/versions/80/openssl.sh | 104 ---------------- plugins/php-ya/versions/80/pcntl.sh | 96 --------------- plugins/php-ya/versions/80/redis.sh | 98 --------------- plugins/php-ya/versions/80/solr.sh | 103 ---------------- plugins/php-ya/versions/80/xhprof.sh | 102 ---------------- plugins/php-ya/versions/80/yac.sh | 99 ---------------- plugins/php-ya/versions/80/zlib.sh | 102 ---------------- plugins/php-ya/versions/81/exif.sh | 105 ---------------- plugins/php-ya/versions/81/gd.sh | 103 ---------------- plugins/php-ya/versions/81/imagemagick.sh | 96 --------------- plugins/php-ya/versions/81/mcrypt.sh | 100 ---------------- plugins/php-ya/versions/81/mongodb.sh | 96 --------------- plugins/php-ya/versions/81/pcntl.sh | 96 --------------- plugins/php-ya/versions/81/seaslog.sh | 105 ---------------- plugins/php-ya/versions/81/solr.sh | 103 ---------------- plugins/php-ya/versions/81/swoole.sh | 111 ----------------- plugins/php-ya/versions/81/xdebug.sh | 97 --------------- plugins/php-ya/versions/81/xhprof.sh | 102 ---------------- plugins/php-ya/versions/81/yac.sh | 99 ---------------- plugins/php-ya/versions/81/yaf.sh | 99 ---------------- plugins/php-ya/versions/81/yar.sh | 103 ---------------- plugins/php-ya/versions/81/zip.sh | 102 ---------------- plugins/php-ya/versions/81/zlib.sh | 102 ---------------- .../php-ya/versions/{71 => common}/exif.sh | 0 .../versions/{81 => common}/fileinfo.sh | 0 plugins/php-ya/versions/{74 => common}/gd.sh | 0 .../versions/{71 => common}/imagemagick.sh | 0 .../php-ya/versions/{81 => common}/intl.sh | 0 .../php-ya/versions/{72 => common}/mcrypt.sh | 0 .../versions/{81 => common}/memcached.sh | 0 .../php-ya/versions/{74 => common}/mongodb.sh | 0 .../php-ya/versions/{81 => common}/opcache.sh | 0 .../php-ya/versions/{81 => common}/openssl.sh | 0 .../php-ya/versions/{71 => common}/pcntl.sh | 0 .../php-ya/versions/{81 => common}/redis.sh | 0 .../php-ya/versions/{80 => common}/seaslog.sh | 0 .../php-ya/versions/{74 => common}/solr.sh | 0 .../php-ya/versions/{80 => common}/swoole.sh | 0 .../php-ya/versions/{80 => common}/xdebug.sh | 0 .../php-ya/versions/{72 => common}/xhprof.sh | 0 plugins/php-ya/versions/{72 => common}/yac.sh | 0 plugins/php-ya/versions/{80 => common}/yaf.sh | 0 plugins/php-ya/versions/{80 => common}/yar.sh | 0 plugins/php-ya/versions/{80 => common}/zip.sh | 0 .../php-ya/versions/{71 => common}/zlib.sh | 0 133 files changed, 11038 deletions(-) delete mode 100755 plugins/php-ya/versions/71/fileinfo.sh delete mode 100755 plugins/php-ya/versions/71/intl.sh delete mode 100755 plugins/php-ya/versions/71/ioncube.sh delete mode 100755 plugins/php-ya/versions/71/mcrypt.sh delete mode 100755 plugins/php-ya/versions/71/memcached.sh delete mode 100755 plugins/php-ya/versions/71/mongodb.sh delete mode 100755 plugins/php-ya/versions/71/opcache.sh delete mode 100755 plugins/php-ya/versions/71/openssl.sh delete mode 100755 plugins/php-ya/versions/71/redis.sh delete mode 100755 plugins/php-ya/versions/71/seaslog.sh delete mode 100755 plugins/php-ya/versions/71/solr.sh delete mode 100755 plugins/php-ya/versions/71/swoole.sh delete mode 100755 plugins/php-ya/versions/71/xdebug.sh delete mode 100755 plugins/php-ya/versions/71/xhprof.sh delete mode 100755 plugins/php-ya/versions/71/yac.sh delete mode 100755 plugins/php-ya/versions/71/yaf.sh delete mode 100755 plugins/php-ya/versions/71/yar.sh delete mode 100755 plugins/php-ya/versions/71/zip.sh delete mode 100755 plugins/php-ya/versions/72/exif.sh delete mode 100755 plugins/php-ya/versions/72/fileinfo.sh delete mode 100755 plugins/php-ya/versions/72/imagemagick.sh delete mode 100755 plugins/php-ya/versions/72/intl.sh delete mode 100755 plugins/php-ya/versions/72/ioncube.sh delete mode 100755 plugins/php-ya/versions/72/memcached.sh delete mode 100755 plugins/php-ya/versions/72/mongodb.sh delete mode 100755 plugins/php-ya/versions/72/opcache.sh delete mode 100755 plugins/php-ya/versions/72/openssl.sh delete mode 100755 plugins/php-ya/versions/72/pcntl.sh delete mode 100755 plugins/php-ya/versions/72/redis.sh delete mode 100755 plugins/php-ya/versions/72/seaslog.sh delete mode 100755 plugins/php-ya/versions/72/solr.sh delete mode 100755 plugins/php-ya/versions/72/swoole.sh delete mode 100755 plugins/php-ya/versions/72/xdebug.sh delete mode 100755 plugins/php-ya/versions/72/yaf.sh delete mode 100755 plugins/php-ya/versions/72/yar.sh delete mode 100755 plugins/php-ya/versions/72/zip.sh delete mode 100755 plugins/php-ya/versions/72/zlib.sh delete mode 100755 plugins/php-ya/versions/73/exif.sh delete mode 100755 plugins/php-ya/versions/73/fileinfo.sh delete mode 100755 plugins/php-ya/versions/73/imagemagick.sh delete mode 100755 plugins/php-ya/versions/73/intl.sh delete mode 100755 plugins/php-ya/versions/73/ioncube.sh delete mode 100755 plugins/php-ya/versions/73/mcrypt.sh delete mode 100755 plugins/php-ya/versions/73/memcached.sh delete mode 100755 plugins/php-ya/versions/73/mongodb.sh delete mode 100755 plugins/php-ya/versions/73/opcache.sh delete mode 100755 plugins/php-ya/versions/73/openssl.sh delete mode 100755 plugins/php-ya/versions/73/pcntl.sh delete mode 100755 plugins/php-ya/versions/73/redis.sh delete mode 100755 plugins/php-ya/versions/73/seaslog.sh delete mode 100755 plugins/php-ya/versions/73/solr.sh delete mode 100755 plugins/php-ya/versions/73/swoole.sh delete mode 100755 plugins/php-ya/versions/73/xdebug.sh delete mode 100755 plugins/php-ya/versions/73/xhprof.sh delete mode 100755 plugins/php-ya/versions/73/yac.sh delete mode 100755 plugins/php-ya/versions/73/yaf.sh delete mode 100755 plugins/php-ya/versions/73/yar.sh delete mode 100755 plugins/php-ya/versions/73/zip.sh delete mode 100755 plugins/php-ya/versions/73/zlib.sh delete mode 100755 plugins/php-ya/versions/74/exif.sh delete mode 100755 plugins/php-ya/versions/74/fileinfo.sh delete mode 100755 plugins/php-ya/versions/74/imagemagick.sh delete mode 100755 plugins/php-ya/versions/74/intl.sh delete mode 100755 plugins/php-ya/versions/74/ioncube.sh delete mode 100755 plugins/php-ya/versions/74/mcrypt.sh delete mode 100755 plugins/php-ya/versions/74/memcached.sh delete mode 100755 plugins/php-ya/versions/74/opcache.sh delete mode 100755 plugins/php-ya/versions/74/openssl.sh delete mode 100755 plugins/php-ya/versions/74/pcntl.sh delete mode 100755 plugins/php-ya/versions/74/redis.sh delete mode 100755 plugins/php-ya/versions/74/seaslog.sh delete mode 100755 plugins/php-ya/versions/74/swoole.sh delete mode 100755 plugins/php-ya/versions/74/xdebug.sh delete mode 100755 plugins/php-ya/versions/74/xhprof.sh delete mode 100755 plugins/php-ya/versions/74/yac.sh delete mode 100755 plugins/php-ya/versions/74/yaf.sh delete mode 100755 plugins/php-ya/versions/74/yar.sh delete mode 100755 plugins/php-ya/versions/74/zip.sh delete mode 100755 plugins/php-ya/versions/74/zlib.sh delete mode 100755 plugins/php-ya/versions/80/exif.sh delete mode 100755 plugins/php-ya/versions/80/fileinfo.sh delete mode 100755 plugins/php-ya/versions/80/gd.sh delete mode 100755 plugins/php-ya/versions/80/imagemagick.sh delete mode 100755 plugins/php-ya/versions/80/intl.sh delete mode 100755 plugins/php-ya/versions/80/mcrypt.sh delete mode 100755 plugins/php-ya/versions/80/memcached.sh delete mode 100755 plugins/php-ya/versions/80/mongodb.sh delete mode 100755 plugins/php-ya/versions/80/opcache.sh delete mode 100755 plugins/php-ya/versions/80/openssl.sh delete mode 100755 plugins/php-ya/versions/80/pcntl.sh delete mode 100755 plugins/php-ya/versions/80/redis.sh delete mode 100755 plugins/php-ya/versions/80/solr.sh delete mode 100755 plugins/php-ya/versions/80/xhprof.sh delete mode 100755 plugins/php-ya/versions/80/yac.sh delete mode 100755 plugins/php-ya/versions/80/zlib.sh delete mode 100755 plugins/php-ya/versions/81/exif.sh delete mode 100755 plugins/php-ya/versions/81/gd.sh delete mode 100755 plugins/php-ya/versions/81/imagemagick.sh delete mode 100755 plugins/php-ya/versions/81/mcrypt.sh delete mode 100755 plugins/php-ya/versions/81/mongodb.sh delete mode 100755 plugins/php-ya/versions/81/pcntl.sh delete mode 100755 plugins/php-ya/versions/81/seaslog.sh delete mode 100755 plugins/php-ya/versions/81/solr.sh delete mode 100755 plugins/php-ya/versions/81/swoole.sh delete mode 100755 plugins/php-ya/versions/81/xdebug.sh delete mode 100755 plugins/php-ya/versions/81/xhprof.sh delete mode 100755 plugins/php-ya/versions/81/yac.sh delete mode 100755 plugins/php-ya/versions/81/yaf.sh delete mode 100755 plugins/php-ya/versions/81/yar.sh delete mode 100755 plugins/php-ya/versions/81/zip.sh delete mode 100755 plugins/php-ya/versions/81/zlib.sh rename plugins/php-ya/versions/{71 => common}/exif.sh (100%) rename plugins/php-ya/versions/{81 => common}/fileinfo.sh (100%) rename plugins/php-ya/versions/{74 => common}/gd.sh (100%) rename plugins/php-ya/versions/{71 => common}/imagemagick.sh (100%) rename plugins/php-ya/versions/{81 => common}/intl.sh (100%) rename plugins/php-ya/versions/{72 => common}/mcrypt.sh (100%) rename plugins/php-ya/versions/{81 => common}/memcached.sh (100%) rename plugins/php-ya/versions/{74 => common}/mongodb.sh (100%) rename plugins/php-ya/versions/{81 => common}/opcache.sh (100%) rename plugins/php-ya/versions/{81 => common}/openssl.sh (100%) rename plugins/php-ya/versions/{71 => common}/pcntl.sh (100%) rename plugins/php-ya/versions/{81 => common}/redis.sh (100%) rename plugins/php-ya/versions/{80 => common}/seaslog.sh (100%) rename plugins/php-ya/versions/{74 => common}/solr.sh (100%) rename plugins/php-ya/versions/{80 => common}/swoole.sh (100%) rename plugins/php-ya/versions/{80 => common}/xdebug.sh (100%) rename plugins/php-ya/versions/{72 => common}/xhprof.sh (100%) rename plugins/php-ya/versions/{72 => common}/yac.sh (100%) rename plugins/php-ya/versions/{80 => common}/yaf.sh (100%) rename plugins/php-ya/versions/{80 => common}/yar.sh (100%) rename plugins/php-ya/versions/{80 => common}/zip.sh (100%) rename plugins/php-ya/versions/{71 => common}/zlib.sh (100%) diff --git a/plugins/php-ya/versions/71/fileinfo.sh b/plugins/php-ya/versions/71/fileinfo.sh deleted file mode 100755 index 193f44b2e..000000000 --- a/plugins/php-ya/versions/71/fileinfo.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=fileinfo -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 - - FIND_C99=`cat Makefile|grep c99` - if [ "$FIND_C99" == "" ];then - sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile - fi - - 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-ya/versions/71/intl.sh b/plugins/php-ya/versions/71/intl.sh deleted file mode 100755 index 480e003ba..000000000 --- a/plugins/php-ya/versions/71/intl.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=intl -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 $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-icu-dir=${serverPath}/lib/icu - - 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-ya/versions/71/ioncube.sh b/plugins/php-ya/versions/71/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php-ya/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-ya/versions/71/mcrypt.sh b/plugins/php-ya/versions/71/mcrypt.sh deleted file mode 100755 index 93a5b4aa7..000000000 --- a/plugins/php-ya/versions/71/mcrypt.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 - -actionType=$1 -version=$2 - -LIBNAME=mcrypt -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 - 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},请选择其它版本!" - 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-ya/versions/71/memcached.sh b/plugins/php-ya/versions/71/memcached.sh deleted file mode 100755 index cd31d0110..000000000 --- a/plugins/php-ya/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-ya/versions/71/mongodb.sh b/plugins/php-ya/versions/71/mongodb.sh deleted file mode 100755 index ec61dcc33..000000000 --- a/plugins/php-ya/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-ya/versions/71/opcache.sh b/plugins/php-ya/versions/71/opcache.sh deleted file mode 100755 index a4227c20e..000000000 --- a/plugins/php-ya/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-ya/versions/71/openssl.sh b/plugins/php-ya/versions/71/openssl.sh deleted file mode 100755 index bdd1323e5..000000000 --- a/plugins/php-ya/versions/71/openssl.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 - -actionType=$1 -version=$2 - -LIBNAME=openssl -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 - - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh - - 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 - - export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl - 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},请选择其它版本!" - 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-ya/versions/71/redis.sh b/plugins/php-ya/versions/71/redis.sh deleted file mode 100755 index 17485ef91..000000000 --- a/plugins/php-ya/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-ya/versions/71/seaslog.sh b/plugins/php-ya/versions/71/seaslog.sh deleted file mode 100755 index 4ce5de4b2..000000000 --- a/plugins/php-ya/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-ya/versions/71/solr.sh b/plugins/php-ya/versions/71/solr.sh deleted file mode 100755 index 3acb559de..000000000 --- a/plugins/php-ya/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-ya/versions/71/swoole.sh b/plugins/php-ya/versions/71/swoole.sh deleted file mode 100755 index 94a409fcd..000000000 --- a/plugins/php-ya/versions/71/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.5.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 \ - --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-ya/versions/71/xdebug.sh b/plugins/php-ya/versions/71/xdebug.sh deleted file mode 100755 index 267a79d80..000000000 --- a/plugins/php-ya/versions/71/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.7.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 - 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-ya/versions/71/xhprof.sh b/plugins/php-ya/versions/71/xhprof.sh deleted file mode 100755 index f56547b75..000000000 --- a/plugins/php-ya/versions/71/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-ya/versions/71/yac.sh b/plugins/php-ya/versions/71/yac.sh deleted file mode 100755 index d3001a111..000000000 --- a/plugins/php-ya/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-ya/versions/71/yaf.sh b/plugins/php-ya/versions/71/yaf.sh deleted file mode 100755 index d0425d0bc..000000000 --- a/plugins/php-ya/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-ya/versions/71/yar.sh b/plugins/php-ya/versions/71/yar.sh deleted file mode 100755 index 21ccf3142..000000000 --- a/plugins/php-ya/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-ya/versions/71/zip.sh b/plugins/php-ya/versions/71/zip.sh deleted file mode 100755 index 4606559ba..000000000 --- a/plugins/php-ya/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-ya/versions/72/exif.sh b/plugins/php-ya/versions/72/exif.sh deleted file mode 100755 index 7f02ce13b..000000000 --- a/plugins/php-ya/versions/72/exif.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` - -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=exif -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 - - FIND_C99=`cat Makefile|grep c99` - if [ "$FIND_C99" == "" ];then - sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile - fi - - - 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-ya/versions/72/fileinfo.sh b/plugins/php-ya/versions/72/fileinfo.sh deleted file mode 100755 index 193f44b2e..000000000 --- a/plugins/php-ya/versions/72/fileinfo.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=fileinfo -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 - - FIND_C99=`cat Makefile|grep c99` - if [ "$FIND_C99" == "" ];then - sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile - fi - - 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-ya/versions/72/imagemagick.sh b/plugins/php-ya/versions/72/imagemagick.sh deleted file mode 100755 index 6c9688423..000000000 --- a/plugins/php-ya/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-ya/versions/72/intl.sh b/plugins/php-ya/versions/72/intl.sh deleted file mode 100755 index 480e003ba..000000000 --- a/plugins/php-ya/versions/72/intl.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=intl -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 $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-icu-dir=${serverPath}/lib/icu - - 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-ya/versions/72/ioncube.sh b/plugins/php-ya/versions/72/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php-ya/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-ya/versions/72/memcached.sh b/plugins/php-ya/versions/72/memcached.sh deleted file mode 100755 index 9b8a4e815..000000000 --- a/plugins/php-ya/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-ya/versions/72/mongodb.sh b/plugins/php-ya/versions/72/mongodb.sh deleted file mode 100755 index f8ab90551..000000000 --- a/plugins/php-ya/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-ya/versions/72/opcache.sh b/plugins/php-ya/versions/72/opcache.sh deleted file mode 100755 index 0547b1b76..000000000 --- a/plugins/php-ya/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-ya/versions/72/openssl.sh b/plugins/php-ya/versions/72/openssl.sh deleted file mode 100755 index bdd1323e5..000000000 --- a/plugins/php-ya/versions/72/openssl.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 - -actionType=$1 -version=$2 - -LIBNAME=openssl -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 - - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh - - 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 - - export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl - 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},请选择其它版本!" - 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-ya/versions/72/pcntl.sh b/plugins/php-ya/versions/72/pcntl.sh deleted file mode 100755 index 796b84897..000000000 --- a/plugins/php-ya/versions/72/pcntl.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 - -actionType=$1 -version=$2 - -LIBNAME=pcntl -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 - 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},请选择其它版本!" - 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-ya/versions/72/redis.sh b/plugins/php-ya/versions/72/redis.sh deleted file mode 100755 index fe782a92c..000000000 --- a/plugins/php-ya/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-ya/versions/72/seaslog.sh b/plugins/php-ya/versions/72/seaslog.sh deleted file mode 100755 index dde11a1a1..000000000 --- a/plugins/php-ya/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-ya/versions/72/solr.sh b/plugins/php-ya/versions/72/solr.sh deleted file mode 100755 index 2e6f508d4..000000000 --- a/plugins/php-ya/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-ya/versions/72/swoole.sh b/plugins/php-ya/versions/72/swoole.sh deleted file mode 100755 index dae2f8eaf..000000000 --- a/plugins/php-ya/versions/72/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 && 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-ya/versions/72/xdebug.sh b/plugins/php-ya/versions/72/xdebug.sh deleted file mode 100755 index 6e46ded96..000000000 --- a/plugins/php-ya/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-ya/versions/72/yaf.sh b/plugins/php-ya/versions/72/yaf.sh deleted file mode 100755 index 2e0683075..000000000 --- a/plugins/php-ya/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-ya/versions/72/yar.sh b/plugins/php-ya/versions/72/yar.sh deleted file mode 100755 index 0f0aa9c65..000000000 --- a/plugins/php-ya/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-ya/versions/72/zip.sh b/plugins/php-ya/versions/72/zip.sh deleted file mode 100755 index 4606559ba..000000000 --- a/plugins/php-ya/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-ya/versions/72/zlib.sh b/plugins/php-ya/versions/72/zlib.sh deleted file mode 100755 index becdb182d..000000000 --- a/plugins/php-ya/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-ya/versions/73/exif.sh b/plugins/php-ya/versions/73/exif.sh deleted file mode 100755 index 7f02ce13b..000000000 --- a/plugins/php-ya/versions/73/exif.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` - -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=exif -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 - - FIND_C99=`cat Makefile|grep c99` - if [ "$FIND_C99" == "" ];then - sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile - fi - - - 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-ya/versions/73/fileinfo.sh b/plugins/php-ya/versions/73/fileinfo.sh deleted file mode 100755 index 193f44b2e..000000000 --- a/plugins/php-ya/versions/73/fileinfo.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=fileinfo -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 - - FIND_C99=`cat Makefile|grep c99` - if [ "$FIND_C99" == "" ];then - sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile - fi - - 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-ya/versions/73/imagemagick.sh b/plugins/php-ya/versions/73/imagemagick.sh deleted file mode 100755 index 6c9688423..000000000 --- a/plugins/php-ya/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-ya/versions/73/intl.sh b/plugins/php-ya/versions/73/intl.sh deleted file mode 100755 index 480e003ba..000000000 --- a/plugins/php-ya/versions/73/intl.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=intl -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 $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-icu-dir=${serverPath}/lib/icu - - 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-ya/versions/73/ioncube.sh b/plugins/php-ya/versions/73/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php-ya/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-ya/versions/73/mcrypt.sh b/plugins/php-ya/versions/73/mcrypt.sh deleted file mode 100755 index d37a096b5..000000000 --- a/plugins/php-ya/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-ya/versions/73/memcached.sh b/plugins/php-ya/versions/73/memcached.sh deleted file mode 100755 index 7867c851d..000000000 --- a/plugins/php-ya/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-ya/versions/73/mongodb.sh b/plugins/php-ya/versions/73/mongodb.sh deleted file mode 100755 index 9a9c3180b..000000000 --- a/plugins/php-ya/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-ya/versions/73/opcache.sh b/plugins/php-ya/versions/73/opcache.sh deleted file mode 100755 index 73d59f1ed..000000000 --- a/plugins/php-ya/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-ya/versions/73/openssl.sh b/plugins/php-ya/versions/73/openssl.sh deleted file mode 100755 index bdd1323e5..000000000 --- a/plugins/php-ya/versions/73/openssl.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 - -actionType=$1 -version=$2 - -LIBNAME=openssl -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 - - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh - - 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 - - export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl - 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},请选择其它版本!" - 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-ya/versions/73/pcntl.sh b/plugins/php-ya/versions/73/pcntl.sh deleted file mode 100755 index 796b84897..000000000 --- a/plugins/php-ya/versions/73/pcntl.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 - -actionType=$1 -version=$2 - -LIBNAME=pcntl -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 - 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},请选择其它版本!" - 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-ya/versions/73/redis.sh b/plugins/php-ya/versions/73/redis.sh deleted file mode 100755 index 723f604f2..000000000 --- a/plugins/php-ya/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-ya/versions/73/seaslog.sh b/plugins/php-ya/versions/73/seaslog.sh deleted file mode 100755 index bd0ad3c7e..000000000 --- a/plugins/php-ya/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-ya/versions/73/solr.sh b/plugins/php-ya/versions/73/solr.sh deleted file mode 100755 index 7a9186002..000000000 --- a/plugins/php-ya/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-ya/versions/73/swoole.sh b/plugins/php-ya/versions/73/swoole.sh deleted file mode 100755 index 9d86a1171..000000000 --- a/plugins/php-ya/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-ya/versions/73/xdebug.sh b/plugins/php-ya/versions/73/xdebug.sh deleted file mode 100755 index 7355cf3d3..000000000 --- a/plugins/php-ya/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-ya/versions/73/xhprof.sh b/plugins/php-ya/versions/73/xhprof.sh deleted file mode 100755 index 6c64c6d5f..000000000 --- a/plugins/php-ya/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-ya/versions/73/yac.sh b/plugins/php-ya/versions/73/yac.sh deleted file mode 100755 index d1fb22520..000000000 --- a/plugins/php-ya/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-ya/versions/73/yaf.sh b/plugins/php-ya/versions/73/yaf.sh deleted file mode 100755 index 72ab38df2..000000000 --- a/plugins/php-ya/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-ya/versions/73/yar.sh b/plugins/php-ya/versions/73/yar.sh deleted file mode 100755 index 7e48bea34..000000000 --- a/plugins/php-ya/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-ya/versions/73/zip.sh b/plugins/php-ya/versions/73/zip.sh deleted file mode 100755 index 4606559ba..000000000 --- a/plugins/php-ya/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-ya/versions/73/zlib.sh b/plugins/php-ya/versions/73/zlib.sh deleted file mode 100755 index becdb182d..000000000 --- a/plugins/php-ya/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-ya/versions/74/exif.sh b/plugins/php-ya/versions/74/exif.sh deleted file mode 100755 index 7f02ce13b..000000000 --- a/plugins/php-ya/versions/74/exif.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` - -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=exif -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 - - FIND_C99=`cat Makefile|grep c99` - if [ "$FIND_C99" == "" ];then - sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile - fi - - - 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-ya/versions/74/fileinfo.sh b/plugins/php-ya/versions/74/fileinfo.sh deleted file mode 100755 index 193f44b2e..000000000 --- a/plugins/php-ya/versions/74/fileinfo.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=fileinfo -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 - - FIND_C99=`cat Makefile|grep c99` - if [ "$FIND_C99" == "" ];then - sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile - fi - - 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-ya/versions/74/imagemagick.sh b/plugins/php-ya/versions/74/imagemagick.sh deleted file mode 100755 index 6c9688423..000000000 --- a/plugins/php-ya/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-ya/versions/74/intl.sh b/plugins/php-ya/versions/74/intl.sh deleted file mode 100755 index 480e003ba..000000000 --- a/plugins/php-ya/versions/74/intl.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=intl -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 $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-icu-dir=${serverPath}/lib/icu - - 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-ya/versions/74/ioncube.sh b/plugins/php-ya/versions/74/ioncube.sh deleted file mode 100755 index ef5440382..000000000 --- a/plugins/php-ya/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-ya/versions/74/mcrypt.sh b/plugins/php-ya/versions/74/mcrypt.sh deleted file mode 100755 index d37a096b5..000000000 --- a/plugins/php-ya/versions/74/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-ya/versions/74/memcached.sh b/plugins/php-ya/versions/74/memcached.sh deleted file mode 100755 index 7a31cee78..000000000 --- a/plugins/php-ya/versions/74/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.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 - - 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-ya/versions/74/opcache.sh b/plugins/php-ya/versions/74/opcache.sh deleted file mode 100755 index d0994e3c7..000000000 --- a/plugins/php-ya/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-ya/versions/74/openssl.sh b/plugins/php-ya/versions/74/openssl.sh deleted file mode 100755 index bdd1323e5..000000000 --- a/plugins/php-ya/versions/74/openssl.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 - -actionType=$1 -version=$2 - -LIBNAME=openssl -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 - - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh - - 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 - - export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl - 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},请选择其它版本!" - 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-ya/versions/74/pcntl.sh b/plugins/php-ya/versions/74/pcntl.sh deleted file mode 100755 index 796b84897..000000000 --- a/plugins/php-ya/versions/74/pcntl.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 - -actionType=$1 -version=$2 - -LIBNAME=pcntl -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 - 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},请选择其它版本!" - 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-ya/versions/74/redis.sh b/plugins/php-ya/versions/74/redis.sh deleted file mode 100755 index 5e7616828..000000000 --- a/plugins/php-ya/versions/74/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.1.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 - - 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-ya/versions/74/seaslog.sh b/plugins/php-ya/versions/74/seaslog.sh deleted file mode 100755 index 51a6e43c6..000000000 --- a/plugins/php-ya/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-ya/versions/74/swoole.sh b/plugins/php-ya/versions/74/swoole.sh deleted file mode 100755 index abd4a3676..000000000 --- a/plugins/php-ya/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-ya/versions/74/xdebug.sh b/plugins/php-ya/versions/74/xdebug.sh deleted file mode 100755 index 92545ce59..000000000 --- a/plugins/php-ya/versions/74/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.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},请选择其它版本!" - 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-ya/versions/74/xhprof.sh b/plugins/php-ya/versions/74/xhprof.sh deleted file mode 100755 index 8751501bd..000000000 --- a/plugins/php-ya/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-ya/versions/74/yac.sh b/plugins/php-ya/versions/74/yac.sh deleted file mode 100755 index d1fb22520..000000000 --- a/plugins/php-ya/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-ya/versions/74/yaf.sh b/plugins/php-ya/versions/74/yaf.sh deleted file mode 100755 index 72ab38df2..000000000 --- a/plugins/php-ya/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-ya/versions/74/yar.sh b/plugins/php-ya/versions/74/yar.sh deleted file mode 100755 index bd7adc8b8..000000000 --- a/plugins/php-ya/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-ya/versions/74/zip.sh b/plugins/php-ya/versions/74/zip.sh deleted file mode 100755 index 4606559ba..000000000 --- a/plugins/php-ya/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-ya/versions/74/zlib.sh b/plugins/php-ya/versions/74/zlib.sh deleted file mode 100755 index becdb182d..000000000 --- a/plugins/php-ya/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-ya/versions/80/exif.sh b/plugins/php-ya/versions/80/exif.sh deleted file mode 100755 index 7f02ce13b..000000000 --- a/plugins/php-ya/versions/80/exif.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` - -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=exif -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 - - FIND_C99=`cat Makefile|grep c99` - if [ "$FIND_C99" == "" ];then - sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile - fi - - - 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-ya/versions/80/fileinfo.sh b/plugins/php-ya/versions/80/fileinfo.sh deleted file mode 100755 index 193f44b2e..000000000 --- a/plugins/php-ya/versions/80/fileinfo.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=fileinfo -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 - - FIND_C99=`cat Makefile|grep c99` - if [ "$FIND_C99" == "" ];then - sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile - fi - - 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-ya/versions/80/gd.sh b/plugins/php-ya/versions/80/gd.sh deleted file mode 100755 index f4939fe7e..000000000 --- a/plugins/php-ya/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-ya/versions/80/imagemagick.sh b/plugins/php-ya/versions/80/imagemagick.sh deleted file mode 100755 index 6c9688423..000000000 --- a/plugins/php-ya/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-ya/versions/80/intl.sh b/plugins/php-ya/versions/80/intl.sh deleted file mode 100755 index 480e003ba..000000000 --- a/plugins/php-ya/versions/80/intl.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=intl -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 $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh - - cd $sourcePath/php${version}/ext/${LIBNAME} - - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-icu-dir=${serverPath}/lib/icu - - 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-ya/versions/80/mcrypt.sh b/plugins/php-ya/versions/80/mcrypt.sh deleted file mode 100755 index d37a096b5..000000000 --- a/plugins/php-ya/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-ya/versions/80/memcached.sh b/plugins/php-ya/versions/80/memcached.sh deleted file mode 100755 index 071742fae..000000000 --- a/plugins/php-ya/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-ya/versions/80/mongodb.sh b/plugins/php-ya/versions/80/mongodb.sh deleted file mode 100755 index 1441e172f..000000000 --- a/plugins/php-ya/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-ya/versions/80/opcache.sh b/plugins/php-ya/versions/80/opcache.sh deleted file mode 100755 index 2836741a6..000000000 --- a/plugins/php-ya/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-ya/versions/80/openssl.sh b/plugins/php-ya/versions/80/openssl.sh deleted file mode 100755 index bdd1323e5..000000000 --- a/plugins/php-ya/versions/80/openssl.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 - -actionType=$1 -version=$2 - -LIBNAME=openssl -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 - - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh - - 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 - - export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig - $serverPath/php/$version/bin/phpize - ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --with-openssl - 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},请选择其它版本!" - 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-ya/versions/80/pcntl.sh b/plugins/php-ya/versions/80/pcntl.sh deleted file mode 100755 index 796b84897..000000000 --- a/plugins/php-ya/versions/80/pcntl.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 - -actionType=$1 -version=$2 - -LIBNAME=pcntl -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 - 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},请选择其它版本!" - 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-ya/versions/80/redis.sh b/plugins/php-ya/versions/80/redis.sh deleted file mode 100755 index cb1eb9ac6..000000000 --- a/plugins/php-ya/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-ya/versions/80/solr.sh b/plugins/php-ya/versions/80/solr.sh deleted file mode 100755 index b6fcb1250..000000000 --- a/plugins/php-ya/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-ya/versions/80/xhprof.sh b/plugins/php-ya/versions/80/xhprof.sh deleted file mode 100755 index 6c64c6d5f..000000000 --- a/plugins/php-ya/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-ya/versions/80/yac.sh b/plugins/php-ya/versions/80/yac.sh deleted file mode 100755 index d1fb22520..000000000 --- a/plugins/php-ya/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-ya/versions/80/zlib.sh b/plugins/php-ya/versions/80/zlib.sh deleted file mode 100755 index becdb182d..000000000 --- a/plugins/php-ya/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-ya/versions/81/exif.sh b/plugins/php-ya/versions/81/exif.sh deleted file mode 100755 index 7f02ce13b..000000000 --- a/plugins/php-ya/versions/81/exif.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` - -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=exif -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 - - FIND_C99=`cat Makefile|grep c99` - if [ "$FIND_C99" == "" ];then - sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile - fi - - - 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-ya/versions/81/gd.sh b/plugins/php-ya/versions/81/gd.sh deleted file mode 100755 index f4939fe7e..000000000 --- a/plugins/php-ya/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-ya/versions/81/imagemagick.sh b/plugins/php-ya/versions/81/imagemagick.sh deleted file mode 100755 index 6c9688423..000000000 --- a/plugins/php-ya/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-ya/versions/81/mcrypt.sh b/plugins/php-ya/versions/81/mcrypt.sh deleted file mode 100755 index d37a096b5..000000000 --- a/plugins/php-ya/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-ya/versions/81/mongodb.sh b/plugins/php-ya/versions/81/mongodb.sh deleted file mode 100755 index 1441e172f..000000000 --- a/plugins/php-ya/versions/81/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-ya/versions/81/pcntl.sh b/plugins/php-ya/versions/81/pcntl.sh deleted file mode 100755 index 796b84897..000000000 --- a/plugins/php-ya/versions/81/pcntl.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 - -actionType=$1 -version=$2 - -LIBNAME=pcntl -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 - 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},请选择其它版本!" - 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-ya/versions/81/seaslog.sh b/plugins/php-ya/versions/81/seaslog.sh deleted file mode 100755 index 5a685f1e3..000000000 --- a/plugins/php-ya/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-ya/versions/81/solr.sh b/plugins/php-ya/versions/81/solr.sh deleted file mode 100755 index b6fcb1250..000000000 --- a/plugins/php-ya/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-ya/versions/81/swoole.sh b/plugins/php-ya/versions/81/swoole.sh deleted file mode 100755 index 10085eced..000000000 --- a/plugins/php-ya/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-ya/versions/81/xdebug.sh b/plugins/php-ya/versions/81/xdebug.sh deleted file mode 100755 index 902e1727b..000000000 --- a/plugins/php-ya/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-ya/versions/81/xhprof.sh b/plugins/php-ya/versions/81/xhprof.sh deleted file mode 100755 index 6c64c6d5f..000000000 --- a/plugins/php-ya/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-ya/versions/81/yac.sh b/plugins/php-ya/versions/81/yac.sh deleted file mode 100755 index d1fb22520..000000000 --- a/plugins/php-ya/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-ya/versions/81/yaf.sh b/plugins/php-ya/versions/81/yaf.sh deleted file mode 100755 index ef2a6b047..000000000 --- a/plugins/php-ya/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-ya/versions/81/yar.sh b/plugins/php-ya/versions/81/yar.sh deleted file mode 100755 index b697cc354..000000000 --- a/plugins/php-ya/versions/81/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-ya/versions/81/zip.sh b/plugins/php-ya/versions/81/zip.sh deleted file mode 100755 index dc877acbe..000000000 --- a/plugins/php-ya/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-ya/versions/81/zlib.sh b/plugins/php-ya/versions/81/zlib.sh deleted file mode 100755 index becdb182d..000000000 --- a/plugins/php-ya/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-ya/versions/71/exif.sh b/plugins/php-ya/versions/common/exif.sh similarity index 100% rename from plugins/php-ya/versions/71/exif.sh rename to plugins/php-ya/versions/common/exif.sh diff --git a/plugins/php-ya/versions/81/fileinfo.sh b/plugins/php-ya/versions/common/fileinfo.sh similarity index 100% rename from plugins/php-ya/versions/81/fileinfo.sh rename to plugins/php-ya/versions/common/fileinfo.sh diff --git a/plugins/php-ya/versions/74/gd.sh b/plugins/php-ya/versions/common/gd.sh similarity index 100% rename from plugins/php-ya/versions/74/gd.sh rename to plugins/php-ya/versions/common/gd.sh diff --git a/plugins/php-ya/versions/71/imagemagick.sh b/plugins/php-ya/versions/common/imagemagick.sh similarity index 100% rename from plugins/php-ya/versions/71/imagemagick.sh rename to plugins/php-ya/versions/common/imagemagick.sh diff --git a/plugins/php-ya/versions/81/intl.sh b/plugins/php-ya/versions/common/intl.sh similarity index 100% rename from plugins/php-ya/versions/81/intl.sh rename to plugins/php-ya/versions/common/intl.sh diff --git a/plugins/php-ya/versions/72/mcrypt.sh b/plugins/php-ya/versions/common/mcrypt.sh similarity index 100% rename from plugins/php-ya/versions/72/mcrypt.sh rename to plugins/php-ya/versions/common/mcrypt.sh diff --git a/plugins/php-ya/versions/81/memcached.sh b/plugins/php-ya/versions/common/memcached.sh similarity index 100% rename from plugins/php-ya/versions/81/memcached.sh rename to plugins/php-ya/versions/common/memcached.sh diff --git a/plugins/php-ya/versions/74/mongodb.sh b/plugins/php-ya/versions/common/mongodb.sh similarity index 100% rename from plugins/php-ya/versions/74/mongodb.sh rename to plugins/php-ya/versions/common/mongodb.sh diff --git a/plugins/php-ya/versions/81/opcache.sh b/plugins/php-ya/versions/common/opcache.sh similarity index 100% rename from plugins/php-ya/versions/81/opcache.sh rename to plugins/php-ya/versions/common/opcache.sh diff --git a/plugins/php-ya/versions/81/openssl.sh b/plugins/php-ya/versions/common/openssl.sh similarity index 100% rename from plugins/php-ya/versions/81/openssl.sh rename to plugins/php-ya/versions/common/openssl.sh diff --git a/plugins/php-ya/versions/71/pcntl.sh b/plugins/php-ya/versions/common/pcntl.sh similarity index 100% rename from plugins/php-ya/versions/71/pcntl.sh rename to plugins/php-ya/versions/common/pcntl.sh diff --git a/plugins/php-ya/versions/81/redis.sh b/plugins/php-ya/versions/common/redis.sh similarity index 100% rename from plugins/php-ya/versions/81/redis.sh rename to plugins/php-ya/versions/common/redis.sh diff --git a/plugins/php-ya/versions/80/seaslog.sh b/plugins/php-ya/versions/common/seaslog.sh similarity index 100% rename from plugins/php-ya/versions/80/seaslog.sh rename to plugins/php-ya/versions/common/seaslog.sh diff --git a/plugins/php-ya/versions/74/solr.sh b/plugins/php-ya/versions/common/solr.sh similarity index 100% rename from plugins/php-ya/versions/74/solr.sh rename to plugins/php-ya/versions/common/solr.sh diff --git a/plugins/php-ya/versions/80/swoole.sh b/plugins/php-ya/versions/common/swoole.sh similarity index 100% rename from plugins/php-ya/versions/80/swoole.sh rename to plugins/php-ya/versions/common/swoole.sh diff --git a/plugins/php-ya/versions/80/xdebug.sh b/plugins/php-ya/versions/common/xdebug.sh similarity index 100% rename from plugins/php-ya/versions/80/xdebug.sh rename to plugins/php-ya/versions/common/xdebug.sh diff --git a/plugins/php-ya/versions/72/xhprof.sh b/plugins/php-ya/versions/common/xhprof.sh similarity index 100% rename from plugins/php-ya/versions/72/xhprof.sh rename to plugins/php-ya/versions/common/xhprof.sh diff --git a/plugins/php-ya/versions/72/yac.sh b/plugins/php-ya/versions/common/yac.sh similarity index 100% rename from plugins/php-ya/versions/72/yac.sh rename to plugins/php-ya/versions/common/yac.sh diff --git a/plugins/php-ya/versions/80/yaf.sh b/plugins/php-ya/versions/common/yaf.sh similarity index 100% rename from plugins/php-ya/versions/80/yaf.sh rename to plugins/php-ya/versions/common/yaf.sh diff --git a/plugins/php-ya/versions/80/yar.sh b/plugins/php-ya/versions/common/yar.sh similarity index 100% rename from plugins/php-ya/versions/80/yar.sh rename to plugins/php-ya/versions/common/yar.sh diff --git a/plugins/php-ya/versions/80/zip.sh b/plugins/php-ya/versions/common/zip.sh similarity index 100% rename from plugins/php-ya/versions/80/zip.sh rename to plugins/php-ya/versions/common/zip.sh diff --git a/plugins/php-ya/versions/71/zlib.sh b/plugins/php-ya/versions/common/zlib.sh similarity index 100% rename from plugins/php-ya/versions/71/zlib.sh rename to plugins/php-ya/versions/common/zlib.sh