diff --git a/plugins/php/versions/53/install.sh b/plugins/php/versions/53/install.sh index 3a9e511b1..ca0823b5d 100755 --- a/plugins/php/versions/53/install.sh +++ b/plugins/php/versions/53/install.sh @@ -43,27 +43,27 @@ fi # # --without-iconv=$serverPath/lib/libiconv \ -#--enable-pcntl \ -#--enable-bcmath \ -#--enable-hash \ -#--enable-libxml \ -#--enable-dom \ -#--enable-filter \ -#--enable-fileinfo \ -#--enable-xml \ -#--enable-intl \ -#--enable-exif \ -#--enable-ftp \ -#--enable-wddx \ -#--enable-soap \ -#--enable-posix \ -# --with-zlib-dir=$serverPath/lib/zlib \ -# --enable-zip \ +# --enable-intl \ cd $sourcePath/php/php-5.3.29 && ./configure \ --prefix=$serverPath/php/53 \ --exec-prefix=$serverPath/php/53 \ --with-config-file-path=$serverPath/php/53/etc \ --without-iconv \ +--with-zlib-dir=$serverPath/lib/zlib \ +--enable-zip \ +--enable-exif \ +--enable-hash \ +--enable-libxml \ +--enable-dom \ +--enable-filter \ +--enable-fileinfo \ +--enable-pcntl \ +--enable-bcmath \ +--enable-xml \ +--enable-ftp \ +--enable-wddx \ +--enable-soap \ +--enable-posix \ --enable-sockets \ --enable-mbstring \ --enable-mysqlnd \ diff --git a/plugins/php/versions/53/intl.sh b/plugins/php/versions/53/intl.sh new file mode 100755 index 000000000..4a38e326b --- /dev/null +++ b/plugins/php/versions/53/intl.sh @@ -0,0 +1,89 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` + +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") +sourcePath=${serverPath}/source/php + +LIBNAME=intl +LIBV=3.0.0 +sysName=`uname` +actionType=$1 +version=$2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/${LIBNAME}.so + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_${version}_lib + mkdir -p $php_lib + + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + + cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config + 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-$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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/53/mongo.sh b/plugins/php/versions/53/mongo.sh index ac8a73eda..075f848f4 100755 --- a/plugins/php/versions/53/mongo.sh +++ b/plugins/php/versions/53/mongo.sh @@ -12,7 +12,7 @@ serverPath=$(dirname "$rootPath") sourcePath=${serverPath}/source/php LIBNAME=mongo -LIBV=1.5.0 +LIBV=1.4.5 sysName=`uname` actionType=$1 version=$2 @@ -38,10 +38,12 @@ Install_lib() cd ${LIBNAME}-${LIBV} $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config + echo "./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl-dir=$serverPath/lib/openssl" make && make install cd $php_lib - rm -rf ${LIBNAME}-* + # rm -rf ${LIBNAME}-* fi if [ ! -f "$extFile" ];then diff --git a/plugins/php/versions/53/zendguardloader.sh b/plugins/php/versions/53/zendguardloader.sh index 9b8b111d7..e01d3d5e7 100755 --- a/plugins/php/versions/53/zendguardloader.sh +++ b/plugins/php/versions/53/zendguardloader.sh @@ -43,6 +43,7 @@ Install_lib() cd ZendGuardLoader-php* && cd php-5.3.x cp ZendGuardLoader.so $serverPath/php/$version/lib/php/extensions/no-debug-non-zts-20090626/ + rm -rf $php_lib/ZendGuardLoader* rm -rf $php_lib/zend-loader-php5.3* fi diff --git a/plugins/php/versions/54/mongo.sh b/plugins/php/versions/54/mongo.sh new file mode 100755 index 000000000..33859e2f7 --- /dev/null +++ b/plugins/php/versions/54/mongo.sh @@ -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=mongo +LIBV=1.4.5 +sysName=`uname` +actionType=$1 +version=$2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20100525/${LIBNAME}.so + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_${version}_lib + mkdir -p $php_lib + + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + + cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config + echo "./configure --with-php-config=$serverPath/php/$version/bin/php-config \ + --with-openssl-dir=$serverPath/lib/openssl" + make && make install + + cd $php_lib + # rm -rf ${LIBNAME}-* + fi + + if [ ! -f "$extFile" ];then + echo "ERROR!" + return + fi + + echo "" >> $serverPath/php/$version/etc/php.ini + echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + + $serverPath/php/init.d/php$version reload + echo '===========================================================' + echo 'successful!' +} + + +Uninstall_lib() +{ + if [ ! -f "$serverPath/php/$version/bin/php-config" ];then + echo "php$version 未安装,请选择其它版本!" + return + fi + + if [ ! -f "$extFile" ];then + echo "php$version 未安装${LIBNAME},请选择其它版本!" + echo "php-$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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/55/mongodb.sh b/plugins/php/versions/55/mongodb.sh new file mode 100755 index 000000000..6a012d067 --- /dev/null +++ b/plugins/php/versions/55/mongodb.sh @@ -0,0 +1,89 @@ +#!/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.5.3 +sysName=`uname` +actionType=$1 +version=$2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20121212/${LIBNAME}.so + +Install_lib() +{ + isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` + if [ "${isInstall}" != "" ];then + echo "php$version 已安装${LIBNAME},请选择其它版本!" + return + fi + + + if [ ! -f "$extFile" ];then + + php_lib=$sourcePath/php_${version}_lib + mkdir -p $php_lib + + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + + cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz + cd ${LIBNAME}-${LIBV} + $serverPath/php/$version/bin/phpize + ./configure --with-php-config=$serverPath/php/$version/bin/php-config + 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-$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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/56/mongodb.sh b/plugins/php/versions/56/mongodb.sh new file mode 100755 index 000000000..7d4362e4f --- /dev/null +++ b/plugins/php/versions/56/mongodb.sh @@ -0,0 +1,89 @@ +#!/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.5.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 + 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-$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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/70/mongodb.sh b/plugins/php/versions/70/mongodb.sh new file mode 100755 index 000000000..81d2b1ad8 --- /dev/null +++ b/plugins/php/versions/70/mongodb.sh @@ -0,0 +1,89 @@ +#!/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.5.3 +sysName=`uname` +actionType=$1 +version=$2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20151012/${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 + 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-$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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/71/mongodb.sh b/plugins/php/versions/71/mongodb.sh new file mode 100755 index 000000000..c18ab8308 --- /dev/null +++ b/plugins/php/versions/71/mongodb.sh @@ -0,0 +1,89 @@ +#!/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.5.3 +sysName=`uname` +actionType=$1 +version=$2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20160303/${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 + 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-$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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/72/mongodb.sh b/plugins/php/versions/72/mongodb.sh new file mode 100755 index 000000000..a748cfc88 --- /dev/null +++ b/plugins/php/versions/72/mongodb.sh @@ -0,0 +1,89 @@ +#!/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.5.3 +sysName=`uname` +actionType=$1 +version=$2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20170718/${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 + 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-$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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/73/mongodb.sh b/plugins/php/versions/73/mongodb.sh new file mode 100755 index 000000000..dd47c1970 --- /dev/null +++ b/plugins/php/versions/73/mongodb.sh @@ -0,0 +1,89 @@ +#!/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.5.3 +sysName=`uname` +actionType=$1 +version=$2 +extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20180731/${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 + 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-$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 + $serverPath/php/init.d/php$version reload + echo '===============================================' + echo 'successful!' +} + + +if [ "$actionType" == 'install' ];then + Install_lib +elif [ "$actionType" == 'uninstall' ];then + Uninstall_lib +fi \ No newline at end of file diff --git a/plugins/php/versions/phplib.conf b/plugins/php/versions/phplib.conf index 6b89bf439..10d7a7d41 100755 --- a/plugins/php/versions/phplib.conf +++ b/plugins/php/versions/phplib.conf @@ -47,6 +47,16 @@ "shell": "opcache.sh", "check": "opcache.so" }, + { + "name": "intl", + "versions": [ + "53" + ], + "type": "通用扩展", + "msg": "提供国际化支持", + "shell": "intl.sh", + "check": "intl.so" + }, { "name": "memcache", "versions": [ @@ -200,15 +210,28 @@ "name": "mongo", "versions": [ "53", - "54", - "55", - "56" + "54" ], "type": "通用扩展", "msg": "Mongodb数据库连接驱动", "shell": "mongo.sh", "check": "mongo.so" }, + { + "name": "mongodb", + "versions": [ + "55", + "56", + "70", + "71", + "72", + "73" + ], + "type": "通用扩展", + "msg": "Mongodb数据库连接驱动", + "shell": "mongodb.sh", + "check": "mongodb.so" + }, { "name": "yac", "versions": [ diff --git a/scripts/install_centos.sh b/scripts/install_centos.sh index 98dd67bb6..88d3dcdc0 100755 --- a/scripts/install_centos.sh +++ b/scripts/install_centos.sh @@ -49,7 +49,7 @@ if [ "${isVersion}" == '' ];then fi -yum install -y wget curl unzip zip libzip mysql-devel +yum install -y wget curl unzip zip libzip-devel mysql-devel # if [ ! -d '/www/server/mdserver-web' ];then wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master