pull/109/head
Mr Chen 6 years ago
parent 885a209958
commit d15475c9fe
  1. 85
      plugins/php/versions/53/memcache.sh
  2. 87
      plugins/php/versions/53/memcached.sh
  3. 87
      plugins/php/versions/53/mongo.sh
  4. 2
      plugins/php/versions/53/redis.sh
  5. 101
      plugins/php/versions/53/swoole.sh
  6. 88
      plugins/php/versions/53/xdebug.sh
  7. 90
      plugins/php/versions/53/yaf.sh
  8. 15
      plugins/php/versions/phplib.conf

@ -0,0 +1,85 @@
#!/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=memcache
sysName=`uname`
actionType=$1
version=$2
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 "${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/memcache-2.2.7.tgz http://pecl.php.net/get/memcache-2.2.7.tgz
cd $php_lib && tar xvf memcache-2.2.7.tgz
cd memcache-2.2.7
$serverPath/php/$version/bin/phpize
./configure --with-php-config=$serverPath/php/$version/bin/php-config --enable-memcache --with-zlib-dir
make && make install
cd $php_lib
rm -rf memcache-*
rm -f package.xml
fi
if [ ! -f "$extFile" ];then
echo "ERROR!"
return
fi
echo "extension=memcache.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-$vphp not install memcache, Plese select other version!"
return
fi
sed -i '_bak' '/memcache.so/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

@ -0,0 +1,87 @@
#!/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
sysName=`uname`
actionType=$1
version=$2
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 "${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}-2.2.0.tgz http://pecl.php.net/get/${LIBNAME}-2.2.0.tgz
cd $php_lib && tar xvf ${LIBNAME}-2.2.0.tgz
cd ${LIBNAME}-2.2.0
$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 memcached-*
rm -f package.xml
fi
if [ ! -f "$extFile" ];then
echo "ERROR!"
return
fi
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-$vphp not install ${LIBNAME}, Plese select other version!"
return
fi
sed -i '_bak' '/${LIBNAME}.so/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

@ -0,0 +1,87 @@
#!/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=mongo
LIBV=1.6.16
sysName=`uname`
actionType=$1
version=$2
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 "${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 \
--with-openssl-dir=$serverPath/php/lib/openssl/
make && make install
cd $php_lib
rm -rf memcached-*
rm -f package.xml
fi
if [ ! -f "$extFile" ];then
echo "ERROR!"
return
fi
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-$vphp not install ${LIBNAME}, Plese select other version!"
return
fi
sed -i '_bak' '/${LIBNAME}.so/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

@ -16,7 +16,7 @@ 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-20090626/
Install_lib()
{

@ -0,0 +1,101 @@
#!/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
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/swoole.so
Install_lib()
{
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep 'swoole.so'`
if [ "${isInstall}" != "" ];then
echo "php-$version 已安装yaf,请选择其它版本!"
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
cd $php_lib
tar xvf swoole-$wafV.tgz
cd swoole-$wafV
$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 swoole-*
rm -f package.xml
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 "extension=$extFile"
echo "extension=$extFile" >> $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 未安装swoole,请选择其它版本!"
return
fi
echo $serverPath/php/$version/etc/php.ini
sed -i '_bak' '/swoole.so/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

@ -0,0 +1,88 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=xdebug
LIBV=2.2.7
sysName=`uname`
actionType=$1
version=$2
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 "${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 memcached-*
rm -f package.xml
fi
if [ ! -f "$extFile" ];then
echo "ERROR!"
return
fi
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-$vphp not install ${LIBNAME}, Plese select other version!"
return
fi
sed -i '_bak' '/${LIBNAME}.so/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

@ -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
actionType=$1
version=$2
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/yaf.so
Install_lib()
{
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep 'yaf.so'`
if [ "${isInstall}" != "" ];then
echo "php-$version 已安装yaf,请选择其它版本!"
return
fi
if [ ! -f "$extFile" ];then
wafV='2.3.5';
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then
wafV='3.0.7';
fi
php_lib=$sourcePath/php_${version}_lib
mkdir -p $php_lib
wget -O $php_lib/yaf-$wafV.tgz http://pecl.php.net/get/yaf-$wafV.tgz
cd $php_lib
tar xvf yaf-$wafV.tgz
cd yaf-$wafV
$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 -e "[yaf]\nextension=yaf.so\nyaf.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' '/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
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

@ -271,21 +271,6 @@
"shell": "yac.sh",
"check": "yac.so"
},
{
"name": "sg11",
"versions": [
"52",
"53",
"54",
"55",
"70",
"71"
],
"type": "脚本加密",
"msg": "php代码混淆加密",
"shell": "sg11.sh",
"check": "ixed.lin"
},
{
"name": "readline",
"versions": [

Loading…
Cancel
Save