mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:19:26 +08:00
up
This commit is contained in:
@@ -73,7 +73,6 @@ if [ ! -d $serverPath/php/53 ];then
|
||||
--enable-bcmath \
|
||||
--enable-xml \
|
||||
--enable-ftp \
|
||||
--enable-wddx \
|
||||
--enable-soap \
|
||||
--enable-posix \
|
||||
--enable-sockets \
|
||||
|
||||
@@ -52,7 +52,6 @@ if [ ! -d $serverPath/php/54 ];then
|
||||
--enable-sockets \
|
||||
--enable-ftp \
|
||||
--enable-simplexml \
|
||||
--enable-wddx \
|
||||
--enable-soap \
|
||||
--enable-posix \
|
||||
--enable-sysvmsg \
|
||||
|
||||
@@ -50,7 +50,6 @@ if [ ! -d $serverPath/php/55 ];then
|
||||
--enable-mbstring \
|
||||
--enable-sockets \
|
||||
--enable-ftp \
|
||||
--enable-wddx \
|
||||
--enable-soap \
|
||||
--enable-posix \
|
||||
--enable-sysvmsg \
|
||||
|
||||
@@ -56,7 +56,6 @@ if [ ! -d $serverPath/php/56 ];then
|
||||
--enable-pcntl \
|
||||
--enable-shmop \
|
||||
--enable-intl \
|
||||
--enable-wddx \
|
||||
--enable-soap \
|
||||
--enable-posix \
|
||||
--enable-sysvmsg \
|
||||
|
||||
@@ -53,7 +53,6 @@ if [ ! -d $serverPath/php/70 ];then
|
||||
--enable-ftp \
|
||||
--enable-sockets \
|
||||
--enable-intl \
|
||||
--enable-wddx \
|
||||
--enable-soap \
|
||||
--enable-posix \
|
||||
--enable-sysvmsg \
|
||||
|
||||
@@ -50,7 +50,6 @@ if [ ! -d $serverPath/php/71 ];then
|
||||
--enable-mbstring \
|
||||
--enable-simplexml \
|
||||
--enable-ftp \
|
||||
--enable-wddx \
|
||||
--enable-sockets \
|
||||
--enable-intl \
|
||||
--enable-soap \
|
||||
|
||||
@@ -53,7 +53,6 @@ if [ ! -d $serverPath/php/72 ];then
|
||||
--enable-sockets \
|
||||
--enable-intl \
|
||||
--enable-ftp \
|
||||
--enable-wddx \
|
||||
--enable-soap \
|
||||
--enable-posix \
|
||||
--enable-sysvmsg \
|
||||
|
||||
@@ -12,6 +12,7 @@ install_tmp=${rootPath}/tmp/mw_install.pl
|
||||
|
||||
|
||||
version=7.3.12
|
||||
PHP_VER=73
|
||||
Install_php()
|
||||
{
|
||||
#------------------------ install start ------------------------------------#
|
||||
@@ -19,15 +20,12 @@ echo "安装php-${version} ..." > $install_tmp
|
||||
mkdir -p $sourcePath/php
|
||||
mkdir -p $serverPath/php
|
||||
|
||||
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
|
||||
if [ ! -f $sourcePath/php/${PHP_VER} ];then
|
||||
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz http://au1.php.net/distributions/php-${version}.tar.xz
|
||||
fi
|
||||
|
||||
if [ ! -d $sourcePath/php/php-${version} ];then
|
||||
cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz
|
||||
mv $sourcePath/php/php-${version} $sourcePath/php/${PHP_VER}
|
||||
fi
|
||||
|
||||
|
||||
OPTIONS=''
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
OPTIONS='--without-iconv'
|
||||
@@ -44,7 +42,7 @@ fi
|
||||
|
||||
|
||||
if [ ! -d $serverPath/php/73 ];then
|
||||
cd $sourcePath/php/php-${version} && ./configure \
|
||||
cd $sourcePath/php/${PHP_VER} && ./configure \
|
||||
--prefix=$serverPath/php/73 \
|
||||
--exec-prefix=$serverPath/php/73 \
|
||||
--with-config-file-path=$serverPath/php/73/etc \
|
||||
@@ -57,7 +55,6 @@ if [ ! -d $serverPath/php/73 ];then
|
||||
--enable-sockets \
|
||||
--enable-simplexml \
|
||||
--enable-intl \
|
||||
--enable-wddx \
|
||||
--enable-soap \
|
||||
--enable-posix \
|
||||
--enable-sysvmsg \
|
||||
|
||||
@@ -19,12 +19,14 @@ echo "安装php-${version} ..." > $install_tmp
|
||||
mkdir -p $sourcePath/php
|
||||
mkdir -p $serverPath/php
|
||||
|
||||
if [ ! -d $sourcePath/php/php-src-php-${version} ];then
|
||||
if [ ! -d $sourcePath/php/php74 ];then
|
||||
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.gz https://github.com/php/php-src/archive/php-${version}.tar.gz
|
||||
cd $sourcePath/php && tar zxvf $sourcePath/php/php-${version}.tar.gz
|
||||
|
||||
mv $sourcePath/php/php-src-php-${version} $sourcePath/php/php74
|
||||
fi
|
||||
|
||||
cd $sourcePath/php/php-src-php-${version}
|
||||
cd $sourcePath/php/php74
|
||||
|
||||
OPTIONS=''
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
@@ -48,7 +50,7 @@ fi
|
||||
echo "$sourcePath/php/php-src-php-${version}"
|
||||
|
||||
if [ ! -d $serverPath/php/74 ];then
|
||||
cd $sourcePath/php/php-src-php-${version}
|
||||
cd $sourcePath/php/php74
|
||||
./buildconf --force
|
||||
./configure \
|
||||
--prefix=$serverPath/php/74 \
|
||||
|
||||
Executable
+79
@@ -0,0 +1,79 @@
|
||||
#!/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
|
||||
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20190902/${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
|
||||
|
||||
cd $sourcePath/php74/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
|
||||
|
||||
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},请选择其它版本!"
|
||||
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
|
||||
$serverPath/php/init.d/php$version reload
|
||||
echo '==============================================='
|
||||
echo 'successful!'
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -48,6 +48,16 @@
|
||||
"shell": "opcache.sh",
|
||||
"check": "opcache.so"
|
||||
},
|
||||
{
|
||||
"name": "pcntl",
|
||||
"versions": [
|
||||
"74"
|
||||
],
|
||||
"type": "缓存器",
|
||||
"msg": "用于加速PHP脚本!",
|
||||
"shell": "pcntl.sh",
|
||||
"check": "pcntl.so"
|
||||
},
|
||||
{
|
||||
"name": "intl",
|
||||
"versions": [
|
||||
|
||||
Reference in New Issue
Block a user