diff --git a/plugins/php/versions/53/install.sh b/plugins/php/versions/53/install.sh index 817ee9599..1d88e528a 100755 --- a/plugins/php/versions/53/install.sh +++ b/plugins/php/versions/53/install.sh @@ -60,6 +60,7 @@ cd $sourcePath/php/php-5.3.29 && ./configure \ --enable-mbstring \ --enable-sysvshm \ --enable-sysvmsg \ +--enable-intl \ --enable-exif \ --enable-ftp \ --enable-wddx \ diff --git a/plugins/php/versions/53/swoole.sh b/plugins/php/versions/53/swoole.sh index a8b077de7..ba7564897 100755 --- a/plugins/php/versions/53/swoole.sh +++ b/plugins/php/versions/53/swoole.sh @@ -13,30 +13,33 @@ sourcePath=${serverPath}/source/php actionType=$1 version=$2 -extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/swoole.so + + +LIBNAME=swoole +LIBV='1.10.1'; +if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then + LIBV='2.2.0' +fi +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so + Install_lib() { - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep 'swoole.so'` + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep '${LIBNAME}.so'` if [ "${isInstall}" != "" ];then - echo "php-$version 已安装yaf,请选择其它版本!" + echo "php-$version 已安装${LIBNAME},请选择其它版本!" return fi if [ ! -f "$extFile" ];then - - wafV='1.10.1'; - if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then - wafV='2.2.0'; - fi php_lib=$sourcePath/php_${version}_lib mkdir -p $php_lib - wget -O $php_lib/swoole-$wafV.tgz http://pecl.php.net/get/swoole-$wafV.tgz + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz cd $php_lib - tar xvf swoole-$wafV.tgz - cd swoole-$wafV + tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ @@ -60,8 +63,9 @@ Install_lib() fi done - echo "extension=$extFile" - echo "extension=$extFile" >> $serverPath/php/$version/etc/php.ini + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}" >> $serverPath/php/$version/etc/php.ini $serverPath/php/init.d/php$version reload echo '===========================================================' @@ -72,18 +76,18 @@ Install_lib() Uninstall_lib() { if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" + echo "php-$version 未安装,请选择其它版本!" return fi - if [ ! -f "$extFile" ];then - echo "php$version 未安装swoole,请选择其它版本!" + echo "php-$version 未安装${LIBNAME},请选择其它版本!" return fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/swoole.so/d" $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 $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/54/install.sh b/plugins/php/versions/54/install.sh index de61cbd86..2da5e2e0a 100755 --- a/plugins/php/versions/54/install.sh +++ b/plugins/php/versions/54/install.sh @@ -41,6 +41,7 @@ cd $sourcePath/php/php-5.4.45 && ./configure \ --without-iconv \ --enable-zip \ --enable-mbstring \ +--enable-sockets \ --enable-ftp \ --enable-wddx \ --enable-soap \ diff --git a/plugins/php/versions/54/swoole.sh b/plugins/php/versions/54/swoole.sh index ba4080481..3c5cb8337 100755 --- a/plugins/php/versions/54/swoole.sh +++ b/plugins/php/versions/54/swoole.sh @@ -13,30 +13,33 @@ sourcePath=${serverPath}/source/php actionType=$1 version=$2 -extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20100525/swoole.so + + +LIBNAME=swoole +LIBV='1.10.1'; +if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then + LIBV='2.2.0' +fi +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20100525/${LIBNAME}.so + Install_lib() { - isInstall=`cat $serverPath/php/$version/etc/php.ini|grep 'swoole.so'` + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep '${LIBNAME}.so'` if [ "${isInstall}" != "" ];then - echo "php-$version 已安装yaf,请选择其它版本!" + echo "php-$version 已安装${LIBNAME},请选择其它版本!" return fi if [ ! -f "$extFile" ];then - - wafV='1.10.1'; - if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then - wafV='2.2.0'; - fi php_lib=$sourcePath/php_${version}_lib mkdir -p $php_lib - wget -O $php_lib/swoole-$wafV.tgz http://pecl.php.net/get/swoole-$wafV.tgz + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz cd $php_lib - tar xvf swoole-$wafV.tgz - cd swoole-$wafV + tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ @@ -60,8 +63,9 @@ Install_lib() fi done - echo "extension=$extFile" - echo "extension=$extFile" >> $serverPath/php/$version/etc/php.ini + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}" >> $serverPath/php/$version/etc/php.ini $serverPath/php/init.d/php$version reload echo '===========================================================' @@ -72,18 +76,18 @@ Install_lib() Uninstall_lib() { if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" + echo "php-$version 未安装,请选择其它版本!" return fi - if [ ! -f "$extFile" ];then - echo "php$version 未安装swoole,请选择其它版本!" + echo "php-$version 未安装${LIBNAME},请选择其它版本!" return fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/swoole.so/d" $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 $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/55/install.sh b/plugins/php/versions/55/install.sh index 946fa0559..3f0091ed1 100755 --- a/plugins/php/versions/55/install.sh +++ b/plugins/php/versions/55/install.sh @@ -40,7 +40,9 @@ cd $sourcePath/php/php-5.5.38 && ./configure \ --enable-mysqlnd \ --without-iconv \ --enable-zip \ +--enable-intl \ --enable-mbstring \ +--enable-sockets \ --enable-ftp \ --enable-wddx \ --enable-soap \ diff --git a/plugins/php/versions/56/install.sh b/plugins/php/versions/56/install.sh index 8a44ddbfa..52231523e 100755 --- a/plugins/php/versions/56/install.sh +++ b/plugins/php/versions/56/install.sh @@ -43,7 +43,9 @@ cd $sourcePath/php/php-5.6.36 && ./configure \ --without-iconv \ --enable-zip \ --enable-mbstring \ +--enable-intl \ --enable-ftp \ +--enable-sockets \ --enable-pcntl \ --enable-shmop \ --enable-sysvmsg \ diff --git a/plugins/php/versions/56/memcached.sh b/plugins/php/versions/56/memcached.sh index aa9503973..b522968f6 100755 --- a/plugins/php/versions/56/memcached.sh +++ b/plugins/php/versions/56/memcached.sh @@ -50,6 +50,10 @@ Install_lib() echo "ERROR!" return fi + + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/70/install.sh b/plugins/php/versions/70/install.sh index 2357b7608..25598e5ae 100755 --- a/plugins/php/versions/70/install.sh +++ b/plugins/php/versions/70/install.sh @@ -42,6 +42,8 @@ cd $sourcePath/php/php-7.0.30 && ./configure \ --enable-zip \ --enable-mbstring \ --enable-ftp \ +--enable-sockets \ +--enable-intl \ --enable-wddx \ --enable-soap \ --enable-posix \ diff --git a/plugins/php/versions/70/memcached.sh b/plugins/php/versions/70/memcached.sh new file mode 100755 index 000000000..24869dc92 --- /dev/null +++ b/plugins/php/versions/70/memcached.sh @@ -0,0 +1,90 @@ +#!/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 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20151012/${LIBNAME}.so + +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_${version}_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 \ + --enable-memcache --with-zlib-dir=$serverPath/lib/zlib \ + --with-libmemcached-dir=$serverPath/lib/libmemcached + make && make install + + cd $php_lib + rm -rf ${LIBNAME}-* + 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 reload + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/70/opcache.sh b/plugins/php/versions/70/opcache.sh new file mode 100755 index 000000000..b3199f688 --- /dev/null +++ b/plugins/php/versions/70/opcache.sh @@ -0,0 +1,55 @@ +#!/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 +LIBV=7.0.5 +sysName=`uname` +actionType=$1 +version=$2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20151012/${LIBNAME}.so + +Install_lib() +{ + 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 + + $serverPath/php/init.d/php$version reload + 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 + + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/70/redis.sh b/plugins/php/versions/70/redis.sh index ae44d9686..a85dbcc93 100755 --- a/plugins/php/versions/70/redis.sh +++ b/plugins/php/versions/70/redis.sh @@ -17,13 +17,13 @@ sysName=`uname` actionType=$1 version=$2 -extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20170718/ +extDir=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20151012/ Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` if [ "${isInstall}" != "" ];then - echo "php$version 已安装${LIBNAME},请选择其它版本!" + echo "php-$version 已安装${LIBNAME},请选择其它版本!" return fi @@ -43,10 +43,10 @@ Install_lib() ./configure --with-php-config=$serverPath/php/$version/bin/php-config make && make install - cd $php_lib - rm -rf ${LIBNAME}-* + # cd $php_lib + # rm -rf ${LIBNAME}-* fi - sleep 1 + if [ ! -f "$extFile" ];then echo "ERROR!" return diff --git a/plugins/php/versions/70/swoole.sh b/plugins/php/versions/70/swoole.sh new file mode 100755 index 000000000..3c8a5533f --- /dev/null +++ b/plugins/php/versions/70/swoole.sh @@ -0,0 +1,100 @@ +#!/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.3.0 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20151012/${LIBNAME}.so + +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_${version}_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 \ + --enable-openssl --with-openssl-dir=$serverPath/lib/openssl --enable-sockets + make && make install + cd .. + rm -rf ${LIBNAME}-* + 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}" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php-$version 未安装,请选择其它版本!" + return + fi + + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/70/xdebug.sh b/plugins/php/versions/70/xdebug.sh new file mode 100755 index 000000000..1f36bf7cd --- /dev/null +++ b/plugins/php/versions/70/xdebug.sh @@ -0,0 +1,89 @@ +#!/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 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20151012/${LIBNAME}.so + +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_${version}_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 + + cd $php_lib + rm -rf ${LIBNAME}-* + 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 reload + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/70/yac.sh b/plugins/php/versions/70/yac.sh new file mode 100755 index 000000000..172bfe9f7 --- /dev/null +++ b/plugins/php/versions/70/yac.sh @@ -0,0 +1,94 @@ +#!/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.0.2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20151012/${LIBNAME}.so + +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_${version}_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 + cd .. + rm -rf yaf-* + rm -f package.xml + 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 + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/70/yaf.sh b/plugins/php/versions/70/yaf.sh new file mode 100755 index 000000000..ecebc4382 --- /dev/null +++ b/plugins/php/versions/70/yaf.sh @@ -0,0 +1,99 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + + + +actionType=$1 +version=$2 + +LIBNAME=yaf +LIBV='2.3.5' +if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then + LIBV='3.0.7'; +fi +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20151012/${LIBNAME}.so + +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_${version}_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 + cd .. + rm -rf ${LIBNAME}-* + rm -f package.xml + 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 + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php-$version 未安装,请选择其它版本!" + return + fi + + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/71/install.sh b/plugins/php/versions/71/install.sh index 0e2264281..3fc03d97b 100755 --- a/plugins/php/versions/71/install.sh +++ b/plugins/php/versions/71/install.sh @@ -43,6 +43,8 @@ cd $sourcePath/php/php-${version} && ./configure \ --enable-mbstring \ --enable-ftp \ --enable-wddx \ +--enable-sockets \ +--enable-intl \ --enable-soap \ --enable-posix \ --enable-fpm \ diff --git a/plugins/php/versions/71/memcached.sh b/plugins/php/versions/71/memcached.sh new file mode 100755 index 000000000..fe70cc006 --- /dev/null +++ b/plugins/php/versions/71/memcached.sh @@ -0,0 +1,90 @@ +#!/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 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so + +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_${version}_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 \ + --enable-memcache --with-zlib-dir=$serverPath/lib/zlib \ + --with-libmemcached-dir=$serverPath/lib/libmemcached + make && make install + + cd $php_lib + rm -rf ${LIBNAME}-* + 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 reload + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/71/opcache.sh b/plugins/php/versions/71/opcache.sh new file mode 100755 index 000000000..c5ecbbbc7 --- /dev/null +++ b/plugins/php/versions/71/opcache.sh @@ -0,0 +1,55 @@ +#!/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 +LIBV=7.0.5 +sysName=`uname` +actionType=$1 +version=$2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so + +Install_lib() +{ + 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 + + $serverPath/php/init.d/php$version reload + 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 + + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/71/redis.sh b/plugins/php/versions/71/redis.sh index 5e46bdfad..629a65132 100755 --- a/plugins/php/versions/71/redis.sh +++ b/plugins/php/versions/71/redis.sh @@ -12,6 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=redis +LIBV=4.2.0 sysName=`uname` actionType=$1 version=$2 @@ -22,7 +23,7 @@ Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` if [ "${isInstall}" != "" ];then - echo "php$version 已安装${LIBNAME},请选择其它版本!" + echo "php-$version 已安装${LIBNAME},请选择其它版本!" return fi @@ -32,26 +33,27 @@ Install_lib() php_lib=$sourcePath/php_${version}_lib mkdir -p $php_lib - if [ ! -f $php_lib/redis-4.2.0.tgz ];then - wget -O $php_lib/redis-4.2.0.tgz http://pecl.php.net/get/redis-4.2.0.tgz + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz fi - cd $php_lib && tar xvf redis-4.2.0.tgz - cd redis-4.2.0 + 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 - cd $php_lib - rm -rf redis-* - rm -f package.xml + # cd $php_lib + # rm -rf ${LIBNAME}-* fi - sleep 1 + if [ ! -f "$extFile" ];then echo "ERROR!" return fi - echo "extension=redis.so" >> $serverPath/php/$version/etc/php.ini + + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini $serverPath/php/init.d/php$version reload echo '===========================================================' @@ -62,18 +64,19 @@ Install_lib() Uninstall_lib() { if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" + echo "php-$version 未安装,请选择其它版本!" return fi extFile=$extDir${LIBNAME}.so if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install memcache, Plese select other version!" + echo "php-$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$version not install memcache, Plese select other version!" return fi - sed -i '_bak' '/redis.so/d' $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 $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/71/swoole.sh b/plugins/php/versions/71/swoole.sh new file mode 100755 index 000000000..916b9c76b --- /dev/null +++ b/plugins/php/versions/71/swoole.sh @@ -0,0 +1,100 @@ +#!/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.3.0 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so + +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_${version}_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 \ + --enable-openssl --with-openssl-dir=$serverPath/lib/openssl --enable-sockets + make && make install + cd .. + rm -rf ${LIBNAME}-* + 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}" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php-$version 未安装,请选择其它版本!" + return + fi + + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/71/xdebug.sh b/plugins/php/versions/71/xdebug.sh new file mode 100755 index 000000000..fb0f3a5c6 --- /dev/null +++ b/plugins/php/versions/71/xdebug.sh @@ -0,0 +1,89 @@ +#!/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 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so + +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_${version}_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 + + cd $php_lib + rm -rf ${LIBNAME}-* + 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 reload + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/71/yac.sh b/plugins/php/versions/71/yac.sh new file mode 100755 index 000000000..e53b7417f --- /dev/null +++ b/plugins/php/versions/71/yac.sh @@ -0,0 +1,94 @@ +#!/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.0.2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so + +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_${version}_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 + cd .. + rm -rf yaf-* + rm -f package.xml + 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 + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/71/yaf.sh b/plugins/php/versions/71/yaf.sh index 849ff7aad..3b8c21982 100755 --- a/plugins/php/versions/71/yaf.sh +++ b/plugins/php/versions/71/yaf.sh @@ -12,23 +12,23 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php -LIBNAME=yaf -LIBV='2.3.5' actionType=$1 version=$2 -extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/yaf.so +LIBNAME=yaf +LIBV='2.3.5' if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then - LIBV='3.0.7' + LIBV='3.0.7'; fi +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${LIBNAME}.so Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` if [ "${isInstall}" != "" ];then - echo "php-$version 已安装yaf,请选择其它版本!" + echo "php-$version 已安装${LIBNAME},请选择其它版本!" return fi @@ -48,7 +48,7 @@ Install_lib() ./configure --with-php-config=$serverPath/php/$version/bin/php-config make && make install cd .. - rm -rf yaf-* + rm -rf ${LIBNAME}-* rm -f package.xml fi @@ -57,7 +57,10 @@ Install_lib() return; fi - echo -e "[yaf]\nextension=yaf.so\nyaf.use_namespace=1" >> $serverPath/php/$version/etc/php.ini + 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 $serverPath/php/init.d/php$version reload echo '===========================================================' @@ -68,19 +71,19 @@ Install_lib() Uninstall_lib() { if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" + echo "php-$version 未安装,请选择其它版本!" return fi if [ ! -f "$extFile" ];then - echo "php$version 未安装yaf,请选择其它版本!" + echo "php-$version 未安装${LIBNAME},请选择其它版本!" return fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/yaf.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/yaf.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/\[yaf\]/d" $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 $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/72/install.sh b/plugins/php/versions/72/install.sh index e1badcc79..3534871df 100755 --- a/plugins/php/versions/72/install.sh +++ b/plugins/php/versions/72/install.sh @@ -37,6 +37,8 @@ cd $sourcePath/php/php-${version} && ./configure \ --without-iconv \ --enable-zip \ --enable-mbstring \ +--enable-sockets \ +--enable-intl \ --enable-ftp \ --enable-wddx \ --enable-soap \ diff --git a/plugins/php/versions/72/memcached.sh b/plugins/php/versions/72/memcached.sh new file mode 100755 index 000000000..bee53ca08 --- /dev/null +++ b/plugins/php/versions/72/memcached.sh @@ -0,0 +1,90 @@ +#!/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 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20170718/${LIBNAME}.so + +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_${version}_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 \ + --enable-memcache --with-zlib-dir=$serverPath/lib/zlib \ + --with-libmemcached-dir=$serverPath/lib/libmemcached + make && make install + + cd $php_lib + rm -rf ${LIBNAME}-* + 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 reload + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/72/opcache.sh b/plugins/php/versions/72/opcache.sh new file mode 100755 index 000000000..cb19d6fbb --- /dev/null +++ b/plugins/php/versions/72/opcache.sh @@ -0,0 +1,55 @@ +#!/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 +LIBV=7.0.5 +sysName=`uname` +actionType=$1 +version=$2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20170718/${LIBNAME}.so + +Install_lib() +{ + 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 + + $serverPath/php/init.d/php$version reload + 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 + + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/72/redis.sh b/plugins/php/versions/72/redis.sh index 47544c9f8..d73dd4f4a 100755 --- a/plugins/php/versions/72/redis.sh +++ b/plugins/php/versions/72/redis.sh @@ -12,6 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=redis +LIBV=4.2.0 sysName=`uname` actionType=$1 version=$2 @@ -22,7 +23,7 @@ Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` if [ "${isInstall}" != "" ];then - echo "php$version 已安装${LIBNAME},请选择其它版本!" + echo "php-$version 已安装${LIBNAME},请选择其它版本!" return fi @@ -32,26 +33,27 @@ Install_lib() php_lib=$sourcePath/php_${version}_lib mkdir -p $php_lib - if [ ! -f $php_lib/redis-4.2.0.tgz ];then - wget -O $php_lib/redis-4.2.0.tgz http://pecl.php.net/get/redis-4.2.0.tgz + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz fi - cd $php_lib && tar xvf redis-4.2.0.tgz - cd redis-4.2.0 + 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 - cd $php_lib - rm -rf redis-* - rm -f package.xml + # cd $php_lib + # rm -rf ${LIBNAME}-* fi - sleep 1 + if [ ! -f "$extFile" ];then echo "ERROR!" return fi - echo "extension=redis.so" >> $serverPath/php/$version/etc/php.ini + + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini $serverPath/php/init.d/php$version reload echo '===========================================================' @@ -62,18 +64,19 @@ Install_lib() Uninstall_lib() { if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" + echo "php-$version 未安装,请选择其它版本!" return fi extFile=$extDir${LIBNAME}.so if [ ! -f "$extFile" ];then - echo "php$version 未安装${LIBNAME},请选择其它版本!" - echo "php-$vphp not install memcache, Plese select other version!" + echo "php-$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$version not install memcache, Plese select other version!" return fi - sed -i '_bak' '/redis.so/d' $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 $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/72/swoole.sh b/plugins/php/versions/72/swoole.sh new file mode 100755 index 000000000..03edb3fce --- /dev/null +++ b/plugins/php/versions/72/swoole.sh @@ -0,0 +1,100 @@ +#!/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.3.0 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20170718/${LIBNAME}.so + +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_${version}_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 \ + --enable-openssl --with-openssl-dir=$serverPath/lib/openssl --enable-sockets + make && make install + cd .. + rm -rf ${LIBNAME}-* + 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}" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php-$version 未安装,请选择其它版本!" + return + fi + + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/72/xdebug.sh b/plugins/php/versions/72/xdebug.sh new file mode 100755 index 000000000..892ea6fd7 --- /dev/null +++ b/plugins/php/versions/72/xdebug.sh @@ -0,0 +1,89 @@ +#!/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 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20170718/${LIBNAME}.so + +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_${version}_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 + + cd $php_lib + rm -rf ${LIBNAME}-* + 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 reload + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/72/yac.sh b/plugins/php/versions/72/yac.sh new file mode 100755 index 000000000..5ba2ac928 --- /dev/null +++ b/plugins/php/versions/72/yac.sh @@ -0,0 +1,94 @@ +#!/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.0.2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20170718/${LIBNAME}.so + +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_${version}_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 + cd .. + rm -rf yaf-* + rm -f package.xml + 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 + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/72/yaf.sh b/plugins/php/versions/72/yaf.sh index 5b4fd0a63..90bfc9e7a 100755 --- a/plugins/php/versions/72/yaf.sh +++ b/plugins/php/versions/72/yaf.sh @@ -12,23 +12,23 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php -LIBNAME=yaf -LIBV='2.3.5' actionType=$1 version=$2 -extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20170718/yaf.so +LIBNAME=yaf +LIBV='2.3.5' if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then - LIBV='3.0.7' + LIBV='3.0.7'; fi +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20170718/${LIBNAME}.so Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` if [ "${isInstall}" != "" ];then - echo "php-$version 已安装yaf,请选择其它版本!" + echo "php-$version 已安装${LIBNAME},请选择其它版本!" return fi @@ -48,7 +48,7 @@ Install_lib() ./configure --with-php-config=$serverPath/php/$version/bin/php-config make && make install cd .. - rm -rf yaf-* + rm -rf ${LIBNAME}-* rm -f package.xml fi @@ -57,7 +57,10 @@ Install_lib() return; fi - echo -e "[yaf]\nextension=yaf.so\nyaf.use_namespace=1" >> $serverPath/php/$version/etc/php.ini + 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 $serverPath/php/init.d/php$version reload echo '===========================================================' @@ -68,19 +71,19 @@ Install_lib() Uninstall_lib() { if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" + echo "php-$version 未安装,请选择其它版本!" return fi if [ ! -f "$extFile" ];then - echo "php$version 未安装yaf,请选择其它版本!" + echo "php-$version 未安装${LIBNAME},请选择其它版本!" return fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/yaf.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/yaf.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/\[yaf\]/d" $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 $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/73/install.sh b/plugins/php/versions/73/install.sh index adcf0fb38..b0e6c6718 100755 --- a/plugins/php/versions/73/install.sh +++ b/plugins/php/versions/73/install.sh @@ -38,6 +38,8 @@ cd $sourcePath/php/php-${version} && ./configure \ --enable-zip \ --enable-mbstring \ --enable-ftp \ +--enable-sockets \ +--enable-intl \ --enable-wddx \ --enable-soap \ --enable-posix \ diff --git a/plugins/php/versions/73/memcached.sh b/plugins/php/versions/73/memcached.sh new file mode 100755 index 000000000..033d8b73b --- /dev/null +++ b/plugins/php/versions/73/memcached.sh @@ -0,0 +1,90 @@ +#!/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 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20180731/${LIBNAME}.so + +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_${version}_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 \ + --enable-memcache --with-zlib-dir=$serverPath/lib/zlib \ + --with-libmemcached-dir=$serverPath/lib/libmemcached + make && make install + + cd $php_lib + rm -rf ${LIBNAME}-* + 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 reload + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/73/opcache.sh b/plugins/php/versions/73/opcache.sh new file mode 100755 index 000000000..1c29cbb17 --- /dev/null +++ b/plugins/php/versions/73/opcache.sh @@ -0,0 +1,55 @@ +#!/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 +LIBV=7.0.5 +sysName=`uname` +actionType=$1 +version=$2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20180731/${LIBNAME}.so + +Install_lib() +{ + 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 + + $serverPath/php/init.d/php$version reload + 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 + + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/73/redis.sh b/plugins/php/versions/73/redis.sh index 8f54bac3e..4d5519863 100755 --- a/plugins/php/versions/73/redis.sh +++ b/plugins/php/versions/73/redis.sh @@ -12,6 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=redis +LIBV=4.2.0 sysName=`uname` actionType=$1 version=$2 @@ -22,7 +23,7 @@ Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` if [ "${isInstall}" != "" ];then - echo "php$version 已安装${LIBNAME},请选择其它版本!" + echo "php-$version 已安装${LIBNAME},请选择其它版本!" return fi @@ -32,26 +33,27 @@ Install_lib() php_lib=$sourcePath/php_${version}_lib mkdir -p $php_lib - if [ ! -f $php_lib/redis-4.2.0.tgz ];then - wget -O $php_lib/redis-4.2.0.tgz http://pecl.php.net/get/redis-4.2.0.tgz + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz fi - cd $php_lib && tar xvf redis-4.2.0.tgz - cd redis-4.2.0 + 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 - cd $php_lib - rm -rf redis-* - rm -f package.xml + # cd $php_lib + # rm -rf ${LIBNAME}-* fi - sleep 1 + if [ ! -f "$extFile" ];then echo "ERROR!" return fi - echo "extension=redis.so" >> $serverPath/php/$version/etc/php.ini + + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini $serverPath/php/init.d/php$version reload echo '===========================================================' @@ -62,7 +64,7 @@ Install_lib() Uninstall_lib() { if [ ! -f "$serverPath/php/$version/bin/php-config" ];then - echo "php$version 未安装,请选择其它版本!" + echo "php-$version 未安装,请选择其它版本!" return fi @@ -73,7 +75,8 @@ Uninstall_lib() return fi - sed -i '_bak' '/redis.so/d' $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 $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/73/swoole.sh b/plugins/php/versions/73/swoole.sh new file mode 100755 index 000000000..bb45fa5e2 --- /dev/null +++ b/plugins/php/versions/73/swoole.sh @@ -0,0 +1,100 @@ +#!/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.3.0 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20180731/${LIBNAME}.so + +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_${version}_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 \ + --enable-openssl --with-openssl-dir=$serverPath/lib/openssl --enable-sockets + make && make install + cd .. + rm -rf ${LIBNAME}-* + 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}" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php-$version 未安装,请选择其它版本!" + return + fi + + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/73/xdebug.sh b/plugins/php/versions/73/xdebug.sh new file mode 100755 index 000000000..affe17758 --- /dev/null +++ b/plugins/php/versions/73/xdebug.sh @@ -0,0 +1,89 @@ +#!/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 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20180731/${LIBNAME}.so + +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_${version}_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 + + cd $php_lib + rm -rf ${LIBNAME}-* + 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 reload + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/73/yac.sh b/plugins/php/versions/73/yac.sh new file mode 100755 index 000000000..f50bcfc14 --- /dev/null +++ b/plugins/php/versions/73/yac.sh @@ -0,0 +1,94 @@ +#!/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.0.2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20180731/${LIBNAME}.so + +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_${version}_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 + cd .. + rm -rf yaf-* + rm -f package.xml + 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 + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + 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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/73/yaf.sh b/plugins/php/versions/73/yaf.sh index c2261ab9d..cb25538ab 100755 --- a/plugins/php/versions/73/yaf.sh +++ b/plugins/php/versions/73/yaf.sh @@ -12,23 +12,23 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php -LIBNAME=yaf -LIBV='2.3.5' actionType=$1 version=$2 -extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20180731/yaf.so +LIBNAME=yaf +LIBV='2.3.5' if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then - LIBV='3.0.7' + LIBV='3.0.7'; fi +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20180731/${LIBNAME}.so Install_lib() { isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` if [ "${isInstall}" != "" ];then - echo "php-$version 已安装yaf,请选择其它版本!" + echo "php-$version 已安装${LIBNAME},请选择其它版本!" return fi @@ -48,7 +48,7 @@ Install_lib() ./configure --with-php-config=$serverPath/php/$version/bin/php-config make && make install cd .. - rm -rf yaf-* + rm -rf ${LIBNAME}-* rm -f package.xml fi @@ -57,7 +57,10 @@ Install_lib() return; fi - echo -e "[yaf]\nextension=yaf.so\nyaf.use_namespace=1" >> $serverPath/php/$version/etc/php.ini + 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 $serverPath/php/init.d/php$version reload echo '===========================================================' @@ -73,14 +76,14 @@ Uninstall_lib() fi if [ ! -f "$extFile" ];then - echo "php-$version 未安装yaf,请选择其它版本!" + echo "php-$version 未安装${LIBNAME},请选择其它版本!" return fi echo $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/yaf.so/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/yaf.use_namespace/d" $serverPath/php/$version/etc/php.ini - sed -i '_bak' "/\[yaf\]/d" $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 $serverPath/php/init.d/php$version reload diff --git a/plugins/php/versions/demo.sh b/plugins/php/versions/demo.sh deleted file mode 100755 index ce0fc2842..000000000 --- a/plugins/php/versions/demo.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -# /bin/bash apc.sh uninstall 53 - -curPath=`pwd` - -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -serverPath=$(dirname "$rootPath") -echo $serverPath -Install_yaf() -{ - case "${version}" in - '54') - extFile='/www/server/php/54/lib/php/extensions/no-debug-non-zts-20100525/yaf.so' - ;; - '55') - extFile='/www/server/php/55/lib/php/extensions/no-debug-non-zts-20121212/yaf.so' - ;; - '56') - extFile='/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/yaf.so' - ;; - '70') - extFile='/www/server/php/70/lib/php/extensions/no-debug-non-zts-20151012/yaf.so' - ;; - '71') - extFile='/www/server/php/71/lib/php/extensions/no-debug-non-zts-20160303/yaf.so' - ;; - '71') - extFile='/www/server/php/71/lib/php/extensions/no-debug-non-zts-20160303/yaf.so' - ;; - '72') - extFile='/www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/yaf.so' - ;; - esac - - isInstall=`cat /www/server/php/$version/etc/php.ini|grep 'yaf.so'` - if [ "${isInstall}" != "" ];then - echo "php-$vphp 已安装yaf,请选择其它版本!" - return - fi - - - if [ ! -f "$extFile" ];then - public_file=/www/server/panel/install/public.sh - if [ ! -f $public_file ];then - wget -O $public_file http://download.bt.cn/install/public.sh -T 5; - fi - . $public_file - - download_Url=$NODE_URL - - wafV='2.3.5'; - if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then - wafV='3.0.7'; - fi - wget -O yaf-$wafV.tgz $download_Url/src/yaf-$wafV.tgz - tar xvf yaf-$wafV.tgz - cd yaf-$wafV - - /www/server/php/$version/bin/phpize - ./configure --with-php-config=/www/server/php/$version/bin/php-config - make && make install - cd .. - rm -rf yaf-* - rm -f package.xml - fi - - if [ ! -f "$extFile" ];then - echo "ERROR!" - return; - fi - echo "extension=$extFile" >> /www/server/php/$version/etc/php.ini - - service php-fpm-$version reload - echo '===========================================================' - echo 'successful!' -} - - -Uninstall_yaf() -{ - if [ ! -f "/www/server/php/$version/bin/php-config" ];then - echo "php-$vphp 未安装,请选择其它版本!" - return - fi - - case "${version}" in - '54') - extFile='/www/server/php/54/lib/php/extensions/no-debug-non-zts-20100525/yaf.so' - ;; - '55') - extFile='/www/server/php/55/lib/php/extensions/no-debug-non-zts-20121212/yaf.so' - ;; - '56') - extFile='/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/yaf.so' - ;; - '70') - extFile='/www/server/php/70/lib/php/extensions/no-debug-non-zts-20151012/yaf.so' - ;; - '71') - extFile='/www/server/php/71/lib/php/extensions/no-debug-non-zts-20160303/yaf.so' - ;; - '72') - extFile='/www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/yaf.so' - esac - if [ ! -f "$extFile" ];then - echo "php-$vphp 未安装yaf,请选择其它版本!" - return - fi - - sed -i '/yaf.so/d' /www/server/php/$version/etc/php.ini - - rm -f $extFile - /etc/init.d/php-fpm-$version reload - echo '===============================================' - echo 'successful!' -} - - -actionType=$1 -version=$2 -if [ "$actionType" == 'install' ];then - Install_yaf -elif [ "$actionType" == 'uninstall' ];then - Uninstall_yaf -fi \ No newline at end of file diff --git a/plugins/php/versions/phplib.conf b/plugins/php/versions/phplib.conf index 0fc98bab4..d7dc36086 100755 --- a/plugins/php/versions/phplib.conf +++ b/plugins/php/versions/phplib.conf @@ -52,9 +52,7 @@ "53", "54", "55", - "56", - "70", - "71" + "56" ], "type": "缓存器", "msg": "强大的内容缓存器,不支持集群", @@ -138,30 +136,13 @@ "53", "54", "55", - "56", - "70", - "71" + "56" ], "type": "性能分析", "msg": "不多说,不了解的不要安装!", "shell": "xhprof.sh", "check": "xhprof.so" }, - { - "name": "intl", - "versions": [ - "53", - "54", - "55", - "56", - "70", - "71" - ], - "type": "通用扩展", - "msg": "提供国际化支持", - "shell": "intl.sh", - "check": "intl.so" - }, { "name": "Swoole", "versions": [ @@ -170,7 +151,9 @@ "55", "56", "70", - "71" + "71", + "72", + "73" ], "type": "通用扩展", "msg": "异步、并行、高性能网络通信引擎",