mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user