mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
@@ -2,8 +2,12 @@
|
|||||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
curPath=`pwd`
|
# php 5.2.17 + eaccelerator 0.9.5.3
|
||||||
|
# php 5.3.24 + eaccelerator 0.9.6.1
|
||||||
|
# php 5.4.14 + eaccelerator 1.0 dev
|
||||||
|
|
||||||
|
|
||||||
|
curPath=`pwd`
|
||||||
rootPath=$(dirname "$curPath")
|
rootPath=$(dirname "$curPath")
|
||||||
rootPath=$(dirname "$rootPath")
|
rootPath=$(dirname "$rootPath")
|
||||||
rootPath=$(dirname "$rootPath")
|
rootPath=$(dirname "$rootPath")
|
||||||
@@ -38,7 +42,8 @@ Install_lib()
|
|||||||
cd $php_lib && tar jxvf ${LIBNAME}-${LIBV}.tar.bz2
|
cd $php_lib && tar jxvf ${LIBNAME}-${LIBV}.tar.bz2
|
||||||
cd ${LIBNAME}-${LIBV}
|
cd ${LIBNAME}-${LIBV}
|
||||||
$serverPath/php/$version/bin/phpize
|
$serverPath/php/$version/bin/phpize
|
||||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config --enable-eaccelerator=shared --with-eaccelerator-shared-memory
|
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
|
||||||
|
--enable-eaccelerator=shared --with-eaccelerator-shared-memory
|
||||||
make && make install
|
make && make install
|
||||||
|
|
||||||
cd $php_lib
|
cd $php_lib
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ Install_lib()
|
|||||||
echo "ERROR!"
|
echo "ERROR!"
|
||||||
return
|
return
|
||||||
fi
|
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 "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||||
|
|
||||||
$serverPath/php/init.d/php$version reload
|
$serverPath/php/init.d/php$version reload
|
||||||
@@ -60,18 +63,20 @@ Install_lib()
|
|||||||
Uninstall_lib()
|
Uninstall_lib()
|
||||||
{
|
{
|
||||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||||
echo "php$version 未安装,请选择其它版本!"
|
echo "php-$version 未安装,请选择其它版本!"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$extFile" ];then
|
if [ ! -f "$extFile" ];then
|
||||||
echo "php$version 未安装${LIBNAME},请选择其它版本!"
|
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!"
|
echo "php-$version not install ${LIBNAME}, Plese select other version!"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -i '_bak' '/${LIBNAME}.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
|
rm -f $extFile
|
||||||
$serverPath/php/init.d/php$version reload
|
$serverPath/php/init.d/php$version reload
|
||||||
echo '==============================================='
|
echo '==============================================='
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ serverPath=$(dirname "$rootPath")
|
|||||||
sourcePath=${serverPath}/source/php
|
sourcePath=${serverPath}/source/php
|
||||||
|
|
||||||
LIBNAME=redis
|
LIBNAME=redis
|
||||||
|
LIBV=4.2.0
|
||||||
sysName=`uname`
|
sysName=`uname`
|
||||||
actionType=$1
|
actionType=$1
|
||||||
version=$2
|
version=$2
|
||||||
@@ -32,12 +33,12 @@ Install_lib()
|
|||||||
php_lib=$sourcePath/php_${version}_lib
|
php_lib=$sourcePath/php_${version}_lib
|
||||||
mkdir -p $php_lib
|
mkdir -p $php_lib
|
||||||
|
|
||||||
if [ ! -f $php_lib/redis-4.2.0.tgz ];then
|
if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then
|
||||||
wget -O $php_lib/redis-4.2.0.tgz http://pecl.php.net/get/redis-4.2.0.tgz
|
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $php_lib && tar xvf redis-4.2.0.tgz
|
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz
|
||||||
cd redis-4.2.0
|
cd ${LIBNAME}-${LIBV}
|
||||||
$serverPath/php/$version/bin/phpize
|
$serverPath/php/$version/bin/phpize
|
||||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config
|
./configure --with-php-config=$serverPath/php/$version/bin/php-config
|
||||||
make && make install
|
make && make install
|
||||||
@@ -50,7 +51,9 @@ Install_lib()
|
|||||||
echo "ERROR!"
|
echo "ERROR!"
|
||||||
return
|
return
|
||||||
fi
|
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
|
$serverPath/php/init.d/php$version reload
|
||||||
echo '==========================================================='
|
echo '==========================================================='
|
||||||
@@ -72,7 +75,8 @@ Uninstall_lib()
|
|||||||
return
|
return
|
||||||
fi
|
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
|
rm -f $extFile
|
||||||
$serverPath/php/init.d/php$version reload
|
$serverPath/php/init.d/php$version reload
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ LIBV='2.3.5'
|
|||||||
|
|
||||||
actionType=$1
|
actionType=$1
|
||||||
version=$2
|
version=$2
|
||||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/yaf.so
|
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so
|
||||||
|
|
||||||
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then
|
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then
|
||||||
LIBV='3.0.7';
|
LIBV='3.0.7';
|
||||||
@@ -58,8 +58,8 @@ Install_lib()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||||
echo "[yaf]" >> $serverPath/php/$version/etc/php.ini
|
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||||
echo "extension=yaf.so" >> $serverPath/php/$version/etc/php.ini
|
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||||
echo "yaf.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
|
echo "yaf.use_namespace=1" >> $serverPath/php/$version/etc/php.ini
|
||||||
|
|
||||||
$serverPath/php/init.d/php$version reload
|
$serverPath/php/init.d/php$version reload
|
||||||
|
|||||||
Executable
+92
@@ -0,0 +1,92 @@
|
|||||||
|
#!/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=apc
|
||||||
|
LIBV=3.1.9
|
||||||
|
sysName=`uname`
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
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 "${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
|
||||||
|
|
||||||
|
_LIBNAME=$(echo $LIBNAME | tr '[a-z]' '[A-Z]')
|
||||||
|
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}-${LIBV}
|
||||||
|
rm -rf ${_LIBNAME}-${LIBV}.tgz
|
||||||
|
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
|
||||||
|
|
||||||
|
echo $extFile
|
||||||
|
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
|
||||||
Executable
+90
@@ -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=intl
|
||||||
|
LIBV=3.0.0
|
||||||
|
sysName=`uname`
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
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 "${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 ${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
|
||||||
Executable
+85
@@ -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
|
||||||
|
LIBV=2.2.7
|
||||||
|
sysName=`uname`
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
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 "${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
|
||||||
|
make && make install
|
||||||
|
|
||||||
|
cd $php_lib
|
||||||
|
rm -rf ${LIBNAME}-*
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$extFile" ];then
|
||||||
|
echo "ERROR!"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo "extension=${LIBNAME}.so" >> $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},请选择其它版本!"
|
||||||
|
echo "php-$version not install memcache, Plese select other version!"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini
|
||||||
|
sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini
|
||||||
|
|
||||||
|
rm -f $extFile
|
||||||
|
$serverPath/php/init.d/php$version reload
|
||||||
|
echo '==============================================='
|
||||||
|
echo 'successful!'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$actionType" == 'install' ];then
|
||||||
|
Install_lib
|
||||||
|
elif [ "$actionType" == 'uninstall' ];then
|
||||||
|
Uninstall_lib
|
||||||
|
fi
|
||||||
Executable
+88
@@ -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=memcached
|
||||||
|
LIBV=2.2.0
|
||||||
|
sysName=`uname`
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
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 "${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 "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
|
||||||
@@ -12,11 +12,12 @@ serverPath=$(dirname "$rootPath")
|
|||||||
sourcePath=${serverPath}/source/php
|
sourcePath=${serverPath}/source/php
|
||||||
|
|
||||||
LIBNAME=redis
|
LIBNAME=redis
|
||||||
|
LIBV=4.2.0
|
||||||
sysName=`uname`
|
sysName=`uname`
|
||||||
actionType=$1
|
actionType=$1
|
||||||
version=$2
|
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-20100525/
|
||||||
|
|
||||||
Install_lib()
|
Install_lib()
|
||||||
{
|
{
|
||||||
@@ -32,26 +33,27 @@ Install_lib()
|
|||||||
php_lib=$sourcePath/php_${version}_lib
|
php_lib=$sourcePath/php_${version}_lib
|
||||||
mkdir -p $php_lib
|
mkdir -p $php_lib
|
||||||
|
|
||||||
if [ ! -f $php_lib/redis-4.2.0.tgz ];then
|
if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then
|
||||||
wget -O $php_lib/redis-4.2.0.tgz http://pecl.php.net/get/redis-4.2.0.tgz
|
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $php_lib && tar xvf redis-4.2.0.tgz
|
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz
|
||||||
cd redis-4.2.0
|
cd ${LIBNAME}-${LIBV}
|
||||||
$serverPath/php/$version/bin/phpize
|
$serverPath/php/$version/bin/phpize
|
||||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config
|
./configure --with-php-config=$serverPath/php/$version/bin/php-config
|
||||||
make && make install
|
make && make install
|
||||||
|
|
||||||
cd $php_lib
|
cd $php_lib
|
||||||
rm -rf redis-*
|
rm -rf ${LIBNAME}-*
|
||||||
rm -f package.xml
|
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
if [ ! -f "$extFile" ];then
|
if [ ! -f "$extFile" ];then
|
||||||
echo "ERROR!"
|
echo "ERROR!"
|
||||||
return
|
return
|
||||||
fi
|
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
|
$serverPath/php/init.d/php$version reload
|
||||||
echo '==========================================================='
|
echo '==========================================================='
|
||||||
@@ -73,7 +75,8 @@ Uninstall_lib()
|
|||||||
return
|
return
|
||||||
fi
|
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
|
rm -f $extFile
|
||||||
$serverPath/php/init.d/php$version reload
|
$serverPath/php/init.d/php$version reload
|
||||||
|
|||||||
Executable
+100
@@ -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
|
||||||
|
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20100525/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 ${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 "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
|
||||||
Executable
+91
@@ -0,0 +1,91 @@
|
|||||||
|
#!/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-20100525/${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
|
||||||
Executable
+88
@@ -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=xhprof
|
||||||
|
LIBV=0.9.4
|
||||||
|
sysName=`uname`
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
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 "${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}/extension
|
||||||
|
$serverPath/php/$version/bin/phpize
|
||||||
|
./configure --enable-xhprof --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
|
||||||
Executable
+99
@@ -0,0 +1,99 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
curPath=`pwd`
|
||||||
|
|
||||||
|
rootPath=$(dirname "$curPath")
|
||||||
|
rootPath=$(dirname "$rootPath")
|
||||||
|
rootPath=$(dirname "$rootPath")
|
||||||
|
rootPath=$(dirname "$rootPath")
|
||||||
|
serverPath=$(dirname "$rootPath")
|
||||||
|
sourcePath=${serverPath}/source/php
|
||||||
|
|
||||||
|
|
||||||
|
LIBNAME=yaf
|
||||||
|
LIBV='2.3.5'
|
||||||
|
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20100525/${LIBNAME}.so
|
||||||
|
|
||||||
|
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then
|
||||||
|
LIBV='3.0.7';
|
||||||
|
fi
|
||||||
|
|
||||||
|
Install_lib()
|
||||||
|
{
|
||||||
|
|
||||||
|
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
|
||||||
|
if [ "${isInstall}" != "" ];then
|
||||||
|
echo "php-$version 已安装yaf,请选择其它版本!"
|
||||||
|
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 "yaf.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
|
||||||
Executable
+90
@@ -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=intl
|
||||||
|
LIBV=3.0.0
|
||||||
|
sysName=`uname`
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20121212/${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 ${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
|
||||||
Executable
+85
@@ -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
|
||||||
|
LIBV=2.2.7
|
||||||
|
sysName=`uname`
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20121212/${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
|
||||||
|
make && make install
|
||||||
|
|
||||||
|
cd $php_lib
|
||||||
|
rm -rf ${LIBNAME}-*
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$extFile" ];then
|
||||||
|
echo "ERROR!"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo "extension=${LIBNAME}.so" >> $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},请选择其它版本!"
|
||||||
|
echo "php-$version not install memcache, Plese select other version!"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini
|
||||||
|
sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini
|
||||||
|
|
||||||
|
rm -f $extFile
|
||||||
|
$serverPath/php/init.d/php$version reload
|
||||||
|
echo '==============================================='
|
||||||
|
echo 'successful!'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$actionType" == 'install' ];then
|
||||||
|
Install_lib
|
||||||
|
elif [ "$actionType" == 'uninstall' ];then
|
||||||
|
Uninstall_lib
|
||||||
|
fi
|
||||||
Executable
+88
@@ -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=memcached
|
||||||
|
LIBV=2.2.0
|
||||||
|
sysName=`uname`
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20121212/${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 "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
|
||||||
@@ -12,11 +12,12 @@ serverPath=$(dirname "$rootPath")
|
|||||||
sourcePath=${serverPath}/source/php
|
sourcePath=${serverPath}/source/php
|
||||||
|
|
||||||
LIBNAME=redis
|
LIBNAME=redis
|
||||||
|
LIBV=4.2.0
|
||||||
sysName=`uname`
|
sysName=`uname`
|
||||||
actionType=$1
|
actionType=$1
|
||||||
version=$2
|
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-20121212/
|
||||||
|
|
||||||
Install_lib()
|
Install_lib()
|
||||||
{
|
{
|
||||||
@@ -32,26 +33,27 @@ Install_lib()
|
|||||||
php_lib=$sourcePath/php_${version}_lib
|
php_lib=$sourcePath/php_${version}_lib
|
||||||
mkdir -p $php_lib
|
mkdir -p $php_lib
|
||||||
|
|
||||||
if [ ! -f $php_lib/redis-4.2.0.tgz ];then
|
if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then
|
||||||
wget -O $php_lib/redis-4.2.0.tgz http://pecl.php.net/get/redis-4.2.0.tgz
|
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $php_lib && tar xvf redis-4.2.0.tgz
|
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz
|
||||||
cd redis-4.2.0
|
cd ${LIBNAME}-${LIBV}
|
||||||
$serverPath/php/$version/bin/phpize
|
$serverPath/php/$version/bin/phpize
|
||||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config
|
./configure --with-php-config=$serverPath/php/$version/bin/php-config
|
||||||
make && make install
|
make && make install
|
||||||
|
|
||||||
cd $php_lib
|
cd $php_lib
|
||||||
rm -rf redis-*
|
rm -rf ${LIBNAME}-*
|
||||||
rm -f package.xml
|
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
if [ ! -f "$extFile" ];then
|
if [ ! -f "$extFile" ];then
|
||||||
echo "ERROR!"
|
echo "ERROR!"
|
||||||
return
|
return
|
||||||
fi
|
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
|
$serverPath/php/init.d/php$version reload
|
||||||
echo '==========================================================='
|
echo '==========================================================='
|
||||||
@@ -73,7 +75,8 @@ Uninstall_lib()
|
|||||||
return
|
return
|
||||||
fi
|
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
|
rm -f $extFile
|
||||||
$serverPath/php/init.d/php$version reload
|
$serverPath/php/init.d/php$version reload
|
||||||
|
|||||||
Executable
+100
@@ -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
|
||||||
|
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20121212/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 ${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 "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
|
||||||
Executable
+91
@@ -0,0 +1,91 @@
|
|||||||
|
#!/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-20121212/${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
|
||||||
Executable
+88
@@ -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=xhprof
|
||||||
|
LIBV=0.9.4
|
||||||
|
sysName=`uname`
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20121212/${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}/extension
|
||||||
|
$serverPath/php/$version/bin/phpize
|
||||||
|
./configure --enable-xhprof --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
|
||||||
Executable
+99
@@ -0,0 +1,99 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
curPath=`pwd`
|
||||||
|
|
||||||
|
rootPath=$(dirname "$curPath")
|
||||||
|
rootPath=$(dirname "$rootPath")
|
||||||
|
rootPath=$(dirname "$rootPath")
|
||||||
|
rootPath=$(dirname "$rootPath")
|
||||||
|
serverPath=$(dirname "$rootPath")
|
||||||
|
sourcePath=${serverPath}/source/php
|
||||||
|
|
||||||
|
|
||||||
|
LIBNAME=yaf
|
||||||
|
LIBV='2.3.5'
|
||||||
|
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20121212/${LIBNAME}.so
|
||||||
|
|
||||||
|
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then
|
||||||
|
LIBV='3.0.7';
|
||||||
|
fi
|
||||||
|
|
||||||
|
Install_lib()
|
||||||
|
{
|
||||||
|
|
||||||
|
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
|
||||||
|
if [ "${isInstall}" != "" ];then
|
||||||
|
echo "php-$version 已安装yaf,请选择其它版本!"
|
||||||
|
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 "yaf.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
|
||||||
@@ -12,8 +12,11 @@ serverPath=$(dirname "$rootPath")
|
|||||||
sourcePath=${serverPath}/source/php
|
sourcePath=${serverPath}/source/php
|
||||||
|
|
||||||
LIBNAME=memcache
|
LIBNAME=memcache
|
||||||
|
LIBV=2.2.7
|
||||||
sysName=`uname`
|
sysName=`uname`
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so
|
||||||
|
|
||||||
Install_lib()
|
Install_lib()
|
||||||
{
|
{
|
||||||
@@ -23,30 +26,28 @@ Install_lib()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so
|
|
||||||
if [ ! -f "$extFile" ];then
|
if [ ! -f "$extFile" ];then
|
||||||
|
|
||||||
php_lib=$sourcePath/php_${version}_lib
|
php_lib=$sourcePath/php_${version}_lib
|
||||||
mkdir -p $php_lib
|
mkdir -p $php_lib
|
||||||
|
|
||||||
wget -O $php_lib/memcache-2.2.7.tgz http://pecl.php.net/get/memcache-2.2.7.tgz
|
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
|
||||||
|
|
||||||
cd $php_lib && tar xvf memcache-2.2.7.tgz
|
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz
|
||||||
cd memcache-2.2.7
|
cd ${LIBNAME}-${LIBV}
|
||||||
$serverPath/php/$version/bin/phpize
|
$serverPath/php/$version/bin/phpize
|
||||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config --enable-memcache --with-zlib-dir
|
./configure --with-php-config=$serverPath/php/$version/bin/php-config --enable-memcache --with-zlib-dir
|
||||||
make && make install
|
make && make install
|
||||||
|
|
||||||
cd $php_lib
|
cd $php_lib
|
||||||
rm -rf memcache-*
|
rm -rf ${LIBNAME}-*
|
||||||
rm -f package.xml
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$extFile" ];then
|
if [ ! -f "$extFile" ];then
|
||||||
echo "ERROR!"
|
echo "ERROR!"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
echo "extension=memcache.so" >> $serverPath/php/$version/etc/php.ini
|
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||||
|
echo "extension=${LIBNAME}" >> $serverPath/php/$version/etc/php.ini
|
||||||
|
|
||||||
$serverPath/php/init.d/php$version reload
|
$serverPath/php/init.d/php$version reload
|
||||||
echo '==========================================================='
|
echo '==========================================================='
|
||||||
@@ -57,18 +58,18 @@ Install_lib()
|
|||||||
Uninstall_lib()
|
Uninstall_lib()
|
||||||
{
|
{
|
||||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||||
echo "php$version 未安装,请选择其它版本!"
|
echo "php-$version 未安装,请选择其它版本!"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so
|
|
||||||
if [ ! -f "$extFile" ];then
|
if [ ! -f "$extFile" ];then
|
||||||
echo "php$version 未安装${LIBNAME},请选择其它版本!"
|
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||||
echo "php-$vphp not install memcache, Plese select other version!"
|
echo "php-$version not install memcache, Plese select other version!"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -i '_bak' '/memcache.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
|
rm -f $extFile
|
||||||
$serverPath/php/init.d/php$version reload
|
$serverPath/php/init.d/php$version reload
|
||||||
@@ -77,8 +78,6 @@ Uninstall_lib()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
actionType=$1
|
|
||||||
version=$2
|
|
||||||
if [ "$actionType" == 'install' ];then
|
if [ "$actionType" == 'install' ];then
|
||||||
Install_lib
|
Install_lib
|
||||||
elif [ "$actionType" == 'uninstall' ];then
|
elif [ "$actionType" == 'uninstall' ];then
|
||||||
|
|||||||
Executable
+88
@@ -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=memcached
|
||||||
|
LIBV=2.2.0
|
||||||
|
sysName=`uname`
|
||||||
|
actionType=$1
|
||||||
|
version=$2
|
||||||
|
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${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 "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
|
||||||
@@ -180,9 +180,7 @@
|
|||||||
{
|
{
|
||||||
"name": "eAccelerator",
|
"name": "eAccelerator",
|
||||||
"versions": [
|
"versions": [
|
||||||
"52",
|
"53"
|
||||||
"53",
|
|
||||||
"54"
|
|
||||||
],
|
],
|
||||||
"type": "缓存器",
|
"type": "缓存器",
|
||||||
"msg": "内容缓存器",
|
"msg": "内容缓存器",
|
||||||
|
|||||||
Reference in New Issue
Block a user