mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
@@ -55,7 +55,6 @@ cd $sourcePath/php/php-5.3.29 && ./configure \
|
||||
--with-zlib-dir=$serverPath/lib/zlib \
|
||||
--enable-mysqlnd \
|
||||
--without-iconv \
|
||||
--with-gd=$serverPath/lib/libgd \
|
||||
--enable-zip \
|
||||
--enable-sockets \
|
||||
--enable-mbstring \
|
||||
|
||||
@@ -46,8 +46,10 @@ Install_lib()
|
||||
echo "ERROR!"
|
||||
return
|
||||
fi
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==========================================================='
|
||||
|
||||
@@ -50,6 +50,9 @@ Install_lib()
|
||||
echo "ERROR!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
|
||||
@@ -50,7 +50,7 @@ Install_lib()
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[opcache]" >> $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
|
||||
echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
@@ -11,8 +11,8 @@ rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
sourcePath=${serverPath}/source/php
|
||||
|
||||
LIBNAME=intl
|
||||
LIBV=3.0.0
|
||||
LIBNAME=imagick
|
||||
LIBV=3.4.3
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
@@ -38,7 +38,8 @@ Install_lib()
|
||||
cd ${LIBNAME}-${LIBV}
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
|
||||
--with-openssl-dir=$serverPath/php/lib/openssl/
|
||||
--enable-memcache --with-zlib-dir=$serverPath/lib/zlib \
|
||||
--with-libmemcached-dir=$serverPath/lib/libmemcached
|
||||
make && make install
|
||||
|
||||
cd $php_lib
|
||||
@@ -73,8 +74,8 @@ Uninstall_lib()
|
||||
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
|
||||
sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini
|
||||
sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
@@ -46,8 +46,10 @@ Install_lib()
|
||||
echo "ERROR!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==========================================================='
|
||||
|
||||
@@ -50,6 +50,9 @@ Install_lib()
|
||||
echo "ERROR!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
|
||||
@@ -20,8 +20,40 @@ extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20100525/
|
||||
|
||||
Install_lib()
|
||||
{
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
|
||||
if [ "${isInstall}" != "" ];then
|
||||
echo "php$version 已安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
php_lib=$sourcePath/php_${version}_lib
|
||||
mkdir -p $php_lib
|
||||
|
||||
wget -O $php_lib/zendopcache-7.0.5.tgz http://pecl.php.net/get/zendopcache-7.0.5.tgz
|
||||
|
||||
cd $php_lib && tar xvf zendopcache-7.0.5.tgz
|
||||
cd zendopcache-7.0.5
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config
|
||||
make && make install
|
||||
|
||||
cp modules/opcache.la $serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20100525/
|
||||
|
||||
cd $php_lib
|
||||
# rm -rf zendopcache-7.0.5
|
||||
# rm -rf zendopcache-7.0.5.tgz
|
||||
# rm -rf package.xml
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "ERROR!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[opcache]" >> $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
|
||||
echo "opcache.enable=1" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "opcache.memory_consumption=128" >> $serverPath/php/$version/etc/php.ini
|
||||
@@ -38,10 +70,26 @@ Install_lib()
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$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
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
|
||||
@@ -11,8 +11,8 @@ rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
sourcePath=${serverPath}/source/php
|
||||
|
||||
LIBNAME=intl
|
||||
LIBV=3.0.0
|
||||
LIBNAME=imagick
|
||||
LIBV=3.4.3
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
@@ -38,7 +38,8 @@ Install_lib()
|
||||
cd ${LIBNAME}-${LIBV}
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
|
||||
--with-openssl-dir=$serverPath/php/lib/openssl/
|
||||
--enable-memcache --with-zlib-dir=$serverPath/lib/zlib \
|
||||
--with-libmemcached-dir=$serverPath/lib/libmemcached
|
||||
make && make install
|
||||
|
||||
cd $php_lib
|
||||
@@ -73,8 +74,8 @@ Uninstall_lib()
|
||||
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
|
||||
sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini
|
||||
sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
@@ -13,30 +13,33 @@ sourcePath=${serverPath}/source/php
|
||||
|
||||
actionType=$1
|
||||
version=$2
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20121212/swoole.so
|
||||
|
||||
|
||||
LIBNAME=swoole
|
||||
LIBV='1.10.1';
|
||||
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then
|
||||
LIBV='2.2.0'
|
||||
fi
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20121212/${LIBNAME}.so
|
||||
|
||||
|
||||
Install_lib()
|
||||
{
|
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep 'swoole.so'`
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep '${LIBNAME}.so'`
|
||||
if [ "${isInstall}" != "" ];then
|
||||
echo "php-$version 已安装yaf,请选择其它版本!"
|
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
wafV='1.10.1';
|
||||
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then
|
||||
wafV='2.2.0';
|
||||
fi
|
||||
|
||||
php_lib=$sourcePath/php_${version}_lib
|
||||
mkdir -p $php_lib
|
||||
wget -O $php_lib/swoole-$wafV.tgz http://pecl.php.net/get/swoole-$wafV.tgz
|
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
|
||||
cd $php_lib
|
||||
tar xvf swoole-$wafV.tgz
|
||||
cd swoole-$wafV
|
||||
tar xvf ${LIBNAME}-${LIBV}.tgz
|
||||
cd ${LIBNAME}-${LIBV}
|
||||
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
|
||||
@@ -60,8 +63,9 @@ Install_lib()
|
||||
fi
|
||||
done
|
||||
|
||||
echo "extension=$extFile"
|
||||
echo "extension=$extFile" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==========================================================='
|
||||
@@ -72,18 +76,18 @@ Install_lib()
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php$version 未安装,请选择其它版本!"
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php$version 未安装swoole,请选择其它版本!"
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i '_bak' "/swoole.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
|
||||
Executable
+91
@@ -0,0 +1,91 @@
|
||||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
curPath=`pwd`
|
||||
|
||||
rootPath=$(dirname "$curPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
sourcePath=${serverPath}/source/php
|
||||
|
||||
LIBNAME=imagick
|
||||
LIBV=3.4.3
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so
|
||||
|
||||
Install_lib()
|
||||
{
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
|
||||
if [ "${isInstall}" != "" ];then
|
||||
echo "php$version 已安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
php_lib=$sourcePath/php_${version}_lib
|
||||
mkdir -p $php_lib
|
||||
|
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
|
||||
|
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz
|
||||
cd ${LIBNAME}-${LIBV}
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
|
||||
--enable-memcache --with-zlib-dir=$serverPath/lib/zlib \
|
||||
--with-libmemcached-dir=$serverPath/lib/libmemcached
|
||||
make && make install
|
||||
|
||||
cd $php_lib
|
||||
rm -rf ${LIBNAME}-*
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "ERROR!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==========================================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
echo "php-$version not install ${LIBNAME}, Plese select other version!"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i '_bak' '/${LIBNAME}.so/d' $serverPath/php/$version/etc/php.ini
|
||||
sed -i '_bak' '/${LIBNAME}/d' $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -11,45 +11,59 @@ rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
sourcePath=${serverPath}/source/php
|
||||
|
||||
actionType=$1
|
||||
version=$2
|
||||
|
||||
|
||||
LIBNAME=swoole
|
||||
LIBV='1.10.1';
|
||||
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then
|
||||
LIBV='2.2.0'
|
||||
fi
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so
|
||||
|
||||
|
||||
Install_lib()
|
||||
{
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/swoole.so
|
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep 'swoole.so'`
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep '${LIBNAME}.so'`
|
||||
if [ "${isInstall}" != "" ];then
|
||||
echo "php-$version 已安装yaf,请选择其它版本!"
|
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
wafV='1.10.1';
|
||||
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then
|
||||
wafV='2.2.0';
|
||||
fi
|
||||
|
||||
php_lib=$sourcePath/php_${version}_lib
|
||||
mkdir -p $php_lib
|
||||
wget -O $php_lib/swoole-$wafV.tgz http://pecl.php.net/get/swoole-$wafV.tgz
|
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
|
||||
cd $php_lib
|
||||
tar xvf swoole-$wafV.tgz
|
||||
cd swoole-$wafV
|
||||
tar xvf ${LIBNAME}-${LIBV}.tgz
|
||||
cd ${LIBNAME}-${LIBV}
|
||||
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
|
||||
--enable-openssl --with-openssl-dir=$serverPath/lib/openssl --enable-sockets
|
||||
make && make install
|
||||
cd ..
|
||||
rm -rf swoole-*
|
||||
rm -f package.xml
|
||||
rm -rf ${LIBNAME}-*
|
||||
fi
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "ERROR!"
|
||||
return;
|
||||
fi
|
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
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
|
||||
|
||||
@@ -62,18 +76,18 @@ Install_lib()
|
||||
Uninstall_lib()
|
||||
{
|
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
|
||||
echo "php$version 未安装,请选择其它版本!"
|
||||
echo "php-$version 未安装,请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/swoole.so
|
||||
if [ ! -f "$extFile" ];then
|
||||
echo "php$version 未安装swoole,请选择其它版本!"
|
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
echo $serverPath/php/$version/etc/php.ini
|
||||
sed -i '_bak' '/swoole.so/d' $serverPath/php/$version/etc/php.ini
|
||||
sed -i '_bak' "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini
|
||||
sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
@@ -82,8 +96,7 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
actionType=$1
|
||||
version=$2
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
|
||||
@@ -11,34 +11,31 @@ rootPath=$(dirname "$rootPath")
|
||||
serverPath=$(dirname "$rootPath")
|
||||
sourcePath=${serverPath}/source/php
|
||||
|
||||
LIBNAME=intl
|
||||
LIBV=3.0.0
|
||||
LIBNAME=xhprof
|
||||
LIBV=0.9.4
|
||||
sysName=`uname`
|
||||
actionType=$1
|
||||
version=$2
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20131226/${LIBNAME}.so
|
||||
|
||||
Install_lib()
|
||||
{
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
|
||||
if [ "${isInstall}" != "" ];then
|
||||
echo "php$version 已安装${LIBNAME},请选择其它版本!"
|
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!"
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
php_lib=$sourcePath/php_${version}_lib
|
||||
mkdir -p $php_lib
|
||||
|
||||
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
|
||||
|
||||
cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz
|
||||
cd ${LIBNAME}-${LIBV}
|
||||
cd ${LIBNAME}-${LIBV}/extension
|
||||
$serverPath/php/$version/bin/phpize
|
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \
|
||||
--with-openssl-dir=$serverPath/php/lib/openssl/
|
||||
./configure --enable-xhprof --with-php-config=$serverPath/php/$version/bin/php-config
|
||||
make && make install
|
||||
|
||||
cd $php_lib
|
||||
@@ -50,6 +47,7 @@ Install_lib()
|
||||
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
|
||||
@@ -76,7 +74,6 @@ 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
|
||||
|
||||
|
||||
rm -f $extFile
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
@@ -38,7 +38,9 @@
|
||||
"55",
|
||||
"56",
|
||||
"70",
|
||||
"71"
|
||||
"71",
|
||||
"72",
|
||||
"73"
|
||||
],
|
||||
"type": "缓存器",
|
||||
"msg": "用于加速PHP脚本!",
|
||||
@@ -126,7 +128,9 @@
|
||||
"55",
|
||||
"56",
|
||||
"70",
|
||||
"71"
|
||||
"71",
|
||||
"72",
|
||||
"73"
|
||||
],
|
||||
"type": "调试器",
|
||||
"msg": "不多说,不了解的不要安装",
|
||||
|
||||
Reference in New Issue
Block a user