mirror of https://github.com/midoks/mdserver-web
pull/121/head
parent
b33ebef7a7
commit
c607d6d35d
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=fileinfo |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
|
||||
FIND_C99=`cat Makefile|grep c99` |
||||
if [ "$FIND_C99" == "" ];then |
||||
sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile |
||||
fi |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,101 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=intl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-icu-dir=${serverPath}/lib/icu |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=ioncube |
||||
LIBV=0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
IC_VERSION=${version:0:1}.${version:1:2} |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} |
||||
extFile=${extDir}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then |
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz |
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz |
||||
fi |
||||
cd $php_lib/ioncube |
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,97 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=mcrypt |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,98 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=memcached |
||||
LIBV=3.1.3 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-memcached \ |
||||
--disable-memcached-sasl && \ |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=mongodb |
||||
LIBV=1.11.1 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
&& make clean && make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,68 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=opcache |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[opcache]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.max_accelerated_files=4000" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,104 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=openssl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
if [ ! -f "config.m4" ];then |
||||
mv config0.m4 config.m4 |
||||
fi |
||||
|
||||
export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig |
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-openssl |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,97 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=redis |
||||
LIBV=4.2.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install memcache, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,106 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=SeasLog |
||||
_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') |
||||
LIBV=2.0.2 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${_LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${_LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
OPTIONS='' |
||||
if [ $sysName == 'Darwin' ]; then |
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" |
||||
fi |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
sleep 1 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') |
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${_LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') |
||||
sed -i $BAK "/${_LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=solr |
||||
LIBV=2.5.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
OPTIONS='' |
||||
if [ $sysName == 'Darwin' ]; then |
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" |
||||
fi |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
sleep 1 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,110 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
LIBNAME=swoole |
||||
LIBV=4.5.2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-openssl \ |
||||
--with-openssl-dir=$serverPath/lib/openssl \ |
||||
--enable-sockets |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
while [[ ! -f "$extFile" ]]; |
||||
do |
||||
echo -e ".\c" |
||||
sleep 0.5 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
fi |
||||
let n+=1 |
||||
if [ $n -gt 8 ];then |
||||
echo "WAIT " $n "TIMES FAIL!" |
||||
return; |
||||
fi |
||||
done |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,95 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=xdebug |
||||
LIBV=2.7.0 |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=xhprof |
||||
LIBV=2.3.5 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV}/extension |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --enable-xhprof \ |
||||
--with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f /tmp/xhprof ];then |
||||
mkdir -p /tmp/xhprof |
||||
chown -R www:www /tmp/xhprof |
||||
fi |
||||
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,102 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=yac |
||||
LIBV=2.3.1 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
|
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装yaf,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,100 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=yaf |
||||
LIBV=3.3.5 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,109 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=yar |
||||
LIBV=2.1.2 |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then |
||||
LIBV=2.0.5 |
||||
fi |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
echo "./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-curl=$serverPath/php/curl" |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-curl=$serverPath/lib/curl |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,100 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=zip |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-zip |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,105 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=exif |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
|
||||
FIND_C99=`cat Makefile|grep c99` |
||||
if [ "$FIND_C99" == "" ];then |
||||
sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile |
||||
fi |
||||
|
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=fileinfo |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
|
||||
FIND_C99=`cat Makefile|grep c99` |
||||
if [ "$FIND_C99" == "" ];then |
||||
sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile |
||||
fi |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=imagick |
||||
LIBV=3.7.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
&& make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,101 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=intl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-icu-dir=${serverPath}/lib/icu |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=ioncube |
||||
LIBV=0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
IC_VERSION=${version:0:1}.${version:1:2} |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} |
||||
extFile=${extDir}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then |
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz |
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz |
||||
fi |
||||
cd $php_lib/ioncube |
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,99 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=memcached |
||||
LIBV=3.1.3 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-memcachedm\ |
||||
--disable-memcached-sasl && \ |
||||
make clean && make && make install && make clean |
||||
|
||||
cd $php_lib |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,97 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=mongodb |
||||
LIBV=1.11.1 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
cd $php_lib |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,68 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=opcache |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[opcache]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.max_accelerated_files=4000" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,104 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=openssl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
if [ ! -f "config.m4" ];then |
||||
mv config0.m4 config.m4 |
||||
fi |
||||
|
||||
export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig |
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-openssl |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=pcntl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,97 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=redis |
||||
LIBV=4.2.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install memcache, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,105 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=SeasLog |
||||
LIBV=2.0.2 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${_LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${_LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
OPTIONS='' |
||||
if [ $sysName == 'Darwin' ]; then |
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" |
||||
fi |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
sleep 1 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${_LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') |
||||
sed -i $BAK "/${_LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=solr |
||||
LIBV=2.5.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "$isInstall" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
OPTIONS='' |
||||
if [ $sysName == 'Darwin' ]; then |
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" |
||||
fi |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
|
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS |
||||
make && make install && make clean |
||||
fi |
||||
sleep 1 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,111 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
|
||||
LIBNAME=swoole |
||||
LIBV=4.8.10 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-openssl \ |
||||
--with-openssl-dir=$serverPath/lib/openssl \ |
||||
--enable-sockets |
||||
make && make install && make clean |
||||
fi |
||||
|
||||
while [[ ! -f "$extFile" ]]; |
||||
do |
||||
echo -e ".\c" |
||||
sleep 0.5 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
fi |
||||
let n+=1 |
||||
if [ $n -gt 8 ];then |
||||
echo "WAIT " $n "TIMES FAIL!" |
||||
return; |
||||
fi |
||||
done |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,94 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=xdebug |
||||
LIBV=2.7.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
|
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
cd ${LIBNAME}-${LIBV} |
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,101 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=yaf |
||||
LIBV=3.3.5 |
||||
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,110 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
|
||||
LIBNAME=yar |
||||
LIBV=2.1.2 |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
|
||||
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then |
||||
LIBV='2.0.5' |
||||
fi |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-curl=$serverPath/lib/curl |
||||
make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,100 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=zip |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-zip |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,102 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=zlib |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
if [ ! -f "config.m4" ];then |
||||
mv config0.m4 config.m4 |
||||
fi |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,105 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=exif |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
|
||||
FIND_C99=`cat Makefile|grep c99` |
||||
if [ "$FIND_C99" == "" ];then |
||||
sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile |
||||
fi |
||||
|
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=fileinfo |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
|
||||
FIND_C99=`cat Makefile|grep c99` |
||||
if [ "$FIND_C99" == "" ];then |
||||
sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile |
||||
fi |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=imagick |
||||
LIBV=3.7.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
&& make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,101 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=intl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-icu-dir=${serverPath}/lib/icu |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=ioncube |
||||
LIBV=0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
IC_VERSION=${version:0:1}.${version:1:2} |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} |
||||
extFile=${extDir}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then |
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz |
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz |
||||
fi |
||||
cd $php_lib/ioncube |
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,100 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=mcrypt |
||||
LIBV=1.0.4 |
||||
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,97 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=memcached |
||||
LIBV=3.1.3 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-memcached \ |
||||
--disable-memcached-sasl && \ |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,94 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=mongodb |
||||
LIBV=1.11.1 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,69 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=opcache |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[opcache]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.max_accelerated_files=4000" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,104 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=openssl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
if [ ! -f "config.m4" ];then |
||||
mv config0.m4 config.m4 |
||||
fi |
||||
|
||||
export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig |
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-openssl |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=pcntl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=redis |
||||
LIBV=4.2.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install memcache, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,105 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=SeasLog |
||||
_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') |
||||
LIBV=2.0.2 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${_LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${_LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
OPTIONS='' |
||||
if [ $sysName == 'Darwin' ]; then |
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" |
||||
fi |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
sleep 1 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') |
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${_LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') |
||||
sed -i $BAK "/${_LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,104 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=solr |
||||
LIBV=2.5.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
OPTIONS='' |
||||
if [ $sysName == 'Darwin' ]; then |
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" |
||||
fi |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
|
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
sleep 1 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,110 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=swoole |
||||
LIBV=4.8.10 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -d "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-openssl \ |
||||
--with-openssl-dir=$serverPath/lib/openssl \ |
||||
--enable-sockets |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
while [[ ! -f "$extFile" ]]; |
||||
do |
||||
echo -e ".\c" |
||||
sleep 0.5 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
fi |
||||
let n+=1 |
||||
if [ $n -gt 8 ];then |
||||
echo "WAIT " $n "TIMES FAIL!" |
||||
return; |
||||
fi |
||||
done |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,95 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=xdebug |
||||
LIBV=2.8.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,102 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=xhprof |
||||
LIBV=2.3.5 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV}/extension |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --enable-xhprof \ |
||||
--with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f /tmp/xhprof ];then |
||||
mkdir -p /tmp/xhprof |
||||
chown -R www:www /tmp/xhprof |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,99 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=yac |
||||
LIBV=2.3.1 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "$isInstall" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
cd .. |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装yaf,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,98 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=yaf |
||||
LIBV=3.3.5 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
|
||||
LIBNAME=yar |
||||
LIBV=2.1.2 |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-curl=$serverPath/lib/curl |
||||
make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,100 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=zip |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-zip |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,102 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=zlib |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
if [ ! -f "config.m4" ];then |
||||
mv config0.m4 config.m4 |
||||
fi |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,105 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=exif |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
|
||||
FIND_C99=`cat Makefile|grep c99` |
||||
if [ "$FIND_C99" == "" ];then |
||||
sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile |
||||
fi |
||||
|
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=fileinfo |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
|
||||
FIND_C99=`cat Makefile|grep c99` |
||||
if [ "$FIND_C99" == "" ];then |
||||
sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile |
||||
fi |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=imagick |
||||
LIBV=3.7.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
&& make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,101 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=intl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-icu-dir=${serverPath}/lib/icu |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=ioncube |
||||
LIBV=0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
IC_VERSION=${version:0:1}.${version:1:2} |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME} |
||||
extFile=${extDir}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/ioncube_loaders_lin.tar.gz ];then |
||||
wget -O $php_lib/ioncube_loaders_lin.tar.gz https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz |
||||
cd $php_lib && tar -zxvf ioncube_loaders_lin.tar.gz |
||||
fi |
||||
cd $php_lib/ioncube |
||||
|
||||
cp -rf $php_lib/ioncube/ioncube_loader_lin_${IC_VERSION}.so $extFile |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,100 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=mcrypt |
||||
LIBV=1.0.4 |
||||
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,101 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=memcached |
||||
LIBV=3.1.4 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
rm -rf $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
sed -i '_bak' "3237,3238s#ulong#zend_ulong#g" $php_lib/${LIBNAME}-${LIBV}/php_memcached.c |
||||
$serverPath/php/$version/bin/phpize |
||||
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-memcached \ |
||||
--disable-memcached-sasl && \ |
||||
make clean && make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,68 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=opcache |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[opcache]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.max_accelerated_files=400000" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,104 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=openssl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
if [ ! -f "config.m4" ];then |
||||
mv config0.m4 config.m4 |
||||
fi |
||||
|
||||
export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig |
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-openssl |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=pcntl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,98 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=redis |
||||
LIBV=5.1.1 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install memcache, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,105 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=SeasLog |
||||
_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') |
||||
LIBV=2.1.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${_LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${_LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
OPTIONS='' |
||||
if [ $sysName == 'Darwin' ]; then |
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" |
||||
fi |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
sleep 1 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') |
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${_LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${_LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${_LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
_LIBNAME=$(echo $LIBNAME | tr '[A-Z]' '[a-z]') |
||||
sed -i $BAK "/${_LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${_LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,112 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=swoole |
||||
LIBV=4.8.10 |
||||
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-openssl --with-openssl-dir=$serverPath/lib/openssl \ |
||||
--enable-sockets |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
while [[ ! -f "$extFile" ]]; |
||||
do |
||||
echo -e ".\c" |
||||
sleep 0.5 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
fi |
||||
let n+=1 |
||||
if [ $n -gt 8 ];then |
||||
echo "WAIT " $n "TIMES FAIL!" |
||||
return; |
||||
fi |
||||
done |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,98 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=xdebug |
||||
LIBV=2.8.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=xhprof |
||||
LIBV=2.3.5 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV}/extension |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --enable-xhprof \ |
||||
--with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f /tmp/xhprof ];then |
||||
mkdir -p /tmp/xhprof |
||||
chown -R www:www /tmp/xhprof |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,99 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=yac |
||||
LIBV=2.3.1 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "$isInstall" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
cd .. |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装yaf,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,98 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=yaf |
||||
LIBV=3.3.5 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
|
||||
LIBNAME=yar |
||||
LIBV=2.1.2 |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-curl=$serverPath/lib/curl |
||||
make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.expose_info=false" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,100 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=zip |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-zip |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,102 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=zlib |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
if [ ! -f "config.m4" ];then |
||||
mv config0.m4 config.m4 |
||||
fi |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,105 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=exif |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
|
||||
FIND_C99=`cat Makefile|grep c99` |
||||
if [ "$FIND_C99" == "" ];then |
||||
sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile |
||||
fi |
||||
|
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=fileinfo |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
|
||||
FIND_C99=`cat Makefile|grep c99` |
||||
if [ "$FIND_C99" == "" ];then |
||||
sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile |
||||
fi |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=gd |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-gd \ |
||||
--with-webp \ |
||||
--with-xpm \ |
||||
--with-jpeg \ |
||||
--with-freetype \ |
||||
--enable-gd-jis-conv |
||||
|
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
$serverPath/php/init.d/php${version} restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=imagick |
||||
LIBV=3.7.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
&& make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,101 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=intl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash icu.sh |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-icu-dir=${serverPath}/lib/icu |
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,100 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=mcrypt |
||||
LIBV=1.0.4 |
||||
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,101 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=memcached |
||||
LIBV=3.1.5 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
rm -rf $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
sed -i '_bak' "3237,3238s#ulong#zend_ulong#g" $php_lib/${LIBNAME}-${LIBV}/php_memcached.c |
||||
$serverPath/php/$version/bin/phpize |
||||
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-memcached \ |
||||
--disable-memcached-sasl && \ |
||||
make clean && make && make install && make clean |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=mongodb |
||||
LIBV=1.11.1 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
&& make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,71 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=opcache |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[opcache]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.interned_strings_buffer=8" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.max_accelerated_files=4000" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.revalidate_freq=60" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.fast_shutdown=1" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.enable_cli=1" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.jit=1205" >> $serverPath/php/$version/etc/php.ini |
||||
echo "opcache.jit_buffer_size=64M" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,104 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=openssl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash openssl.sh |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
if [ ! -f "config.m4" ];then |
||||
mv config0.m4 config.m4 |
||||
fi |
||||
|
||||
export PKG_CONFIG_PATH=$serverPath/lib/openssl/lib/pkgconfig |
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-openssl |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=pcntl |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,98 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=redis |
||||
LIBV=5.3.3 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=solr |
||||
LIBV=2.5.1 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extDir=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/ |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "$isInstall" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
OPTIONS='' |
||||
if [ $sysName == 'Darwin' ]; then |
||||
OPTIONS="${OPTIONS} --with-curl=${serverPath}/lib/curl" |
||||
fi |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
|
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS |
||||
make && make install && make clean |
||||
fi |
||||
sleep 1 |
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
extFile=$extDir${LIBNAME}.so |
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,102 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=xhprof |
||||
LIBV=2.3.5 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV}/extension |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --enable-xhprof \ |
||||
--with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f /tmp/xhprof ];then |
||||
mkdir -p /tmp/xhprof |
||||
chown -R www:www /tmp/xhprof |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.output_dir=/tmp/xhprof" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,99 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=yac |
||||
LIBV=2.3.1 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "$isInstall" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
cd .. |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
echo "${LIBNAME}.use_namespace=1" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装yaf,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,102 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=zlib |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
if [ ! -f "config.m4" ];then |
||||
mv config0.m4 config.m4 |
||||
fi |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,105 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
appPath=$(dirname "$curPath") |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=exif |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
|
||||
FIND_C99=`cat Makefile|grep c99` |
||||
if [ "$FIND_C99" == "" ];then |
||||
sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=c99/g' Makefile |
||||
fi |
||||
|
||||
|
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,103 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=gd |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-gd \ |
||||
--with-webp \ |
||||
--with-xpm \ |
||||
--with-jpeg \ |
||||
--with-freetype \ |
||||
--enable-gd-jis-conv |
||||
|
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
$serverPath/php/init.d/php${version} restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=imagick |
||||
LIBV=3.7.0 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
&& make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,100 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=mcrypt |
||||
LIBV=1.0.4 |
||||
|
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
if [ ! -f $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib |
||||
tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config |
||||
make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return; |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.use_namespace/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/\[${LIBNAME}\]/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -1,96 +0,0 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
LIBNAME=mongodb |
||||
LIBV=1.11.1 |
||||
sysName=`uname` |
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
php_lib=$sourcePath/php_lib |
||||
mkdir -p $php_lib |
||||
|
||||
if [ ! -d $php_lib/${LIBNAME}-${LIBV} ];then |
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz |
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz |
||||
fi |
||||
cd $php_lib/${LIBNAME}-${LIBV} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
&& make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php$version 未安装${LIBNAME},请选择其它版本!" |
||||
echo "php-$vphp not install ${LIBNAME}, Plese select other version!" |
||||
return |
||||
fi |
||||
|
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
bash ${rootPath}/plugins/php/versions/lib.sh $version restart |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue