pull/109/head
midoks 6 years ago
parent d785582f03
commit 653a9297bc
  1. 1
      plugins/php/versions/53/install.sh
  2. 1
      plugins/php/versions/54/install.sh
  3. 1
      plugins/php/versions/55/install.sh
  4. 1
      plugins/php/versions/56/install.sh
  5. 1
      plugins/php/versions/70/install.sh
  6. 1
      plugins/php/versions/71/install.sh
  7. 1
      plugins/php/versions/72/install.sh
  8. 11
      plugins/php/versions/73/install.sh
  9. 8
      plugins/php/versions/74/install.sh
  10. 79
      plugins/php/versions/74/pcntl.sh
  11. 10
      plugins/php/versions/phplib.conf

@ -73,7 +73,6 @@ if [ ! -d $serverPath/php/53 ];then
--enable-bcmath \ --enable-bcmath \
--enable-xml \ --enable-xml \
--enable-ftp \ --enable-ftp \
--enable-wddx \
--enable-soap \ --enable-soap \
--enable-posix \ --enable-posix \
--enable-sockets \ --enable-sockets \

@ -52,7 +52,6 @@ if [ ! -d $serverPath/php/54 ];then
--enable-sockets \ --enable-sockets \
--enable-ftp \ --enable-ftp \
--enable-simplexml \ --enable-simplexml \
--enable-wddx \
--enable-soap \ --enable-soap \
--enable-posix \ --enable-posix \
--enable-sysvmsg \ --enable-sysvmsg \

@ -50,7 +50,6 @@ if [ ! -d $serverPath/php/55 ];then
--enable-mbstring \ --enable-mbstring \
--enable-sockets \ --enable-sockets \
--enable-ftp \ --enable-ftp \
--enable-wddx \
--enable-soap \ --enable-soap \
--enable-posix \ --enable-posix \
--enable-sysvmsg \ --enable-sysvmsg \

@ -56,7 +56,6 @@ if [ ! -d $serverPath/php/56 ];then
--enable-pcntl \ --enable-pcntl \
--enable-shmop \ --enable-shmop \
--enable-intl \ --enable-intl \
--enable-wddx \
--enable-soap \ --enable-soap \
--enable-posix \ --enable-posix \
--enable-sysvmsg \ --enable-sysvmsg \

@ -53,7 +53,6 @@ if [ ! -d $serverPath/php/70 ];then
--enable-ftp \ --enable-ftp \
--enable-sockets \ --enable-sockets \
--enable-intl \ --enable-intl \
--enable-wddx \
--enable-soap \ --enable-soap \
--enable-posix \ --enable-posix \
--enable-sysvmsg \ --enable-sysvmsg \

@ -50,7 +50,6 @@ if [ ! -d $serverPath/php/71 ];then
--enable-mbstring \ --enable-mbstring \
--enable-simplexml \ --enable-simplexml \
--enable-ftp \ --enable-ftp \
--enable-wddx \
--enable-sockets \ --enable-sockets \
--enable-intl \ --enable-intl \
--enable-soap \ --enable-soap \

@ -53,7 +53,6 @@ if [ ! -d $serverPath/php/72 ];then
--enable-sockets \ --enable-sockets \
--enable-intl \ --enable-intl \
--enable-ftp \ --enable-ftp \
--enable-wddx \
--enable-soap \ --enable-soap \
--enable-posix \ --enable-posix \
--enable-sysvmsg \ --enable-sysvmsg \

@ -12,6 +12,7 @@ install_tmp=${rootPath}/tmp/mw_install.pl
version=7.3.12 version=7.3.12
PHP_VER=73
Install_php() Install_php()
{ {
#------------------------ install start ------------------------------------# #------------------------ install start ------------------------------------#
@ -19,15 +20,12 @@ echo "安装php-${version} ..." > $install_tmp
mkdir -p $sourcePath/php mkdir -p $sourcePath/php
mkdir -p $serverPath/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 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 cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz
mv $sourcePath/php/php-${version} $sourcePath/php/${PHP_VER}
fi fi
OPTIONS='' OPTIONS=''
if [ $sysName == 'Darwin' ]; then if [ $sysName == 'Darwin' ]; then
OPTIONS='--without-iconv' OPTIONS='--without-iconv'
@ -44,7 +42,7 @@ fi
if [ ! -d $serverPath/php/73 ];then if [ ! -d $serverPath/php/73 ];then
cd $sourcePath/php/php-${version} && ./configure \ cd $sourcePath/php/${PHP_VER} && ./configure \
--prefix=$serverPath/php/73 \ --prefix=$serverPath/php/73 \
--exec-prefix=$serverPath/php/73 \ --exec-prefix=$serverPath/php/73 \
--with-config-file-path=$serverPath/php/73/etc \ --with-config-file-path=$serverPath/php/73/etc \
@ -57,7 +55,6 @@ if [ ! -d $serverPath/php/73 ];then
--enable-sockets \ --enable-sockets \
--enable-simplexml \ --enable-simplexml \
--enable-intl \ --enable-intl \
--enable-wddx \
--enable-soap \ --enable-soap \
--enable-posix \ --enable-posix \
--enable-sysvmsg \ --enable-sysvmsg \

@ -19,12 +19,14 @@ echo "安装php-${version} ..." > $install_tmp
mkdir -p $sourcePath/php mkdir -p $sourcePath/php
mkdir -p $serverPath/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 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 cd $sourcePath/php && tar zxvf $sourcePath/php/php-${version}.tar.gz
mv $sourcePath/php/php-src-php-${version} $sourcePath/php/php74
fi fi
cd $sourcePath/php/php-src-php-${version} cd $sourcePath/php/php74
OPTIONS='' OPTIONS=''
if [ $sysName == 'Darwin' ]; then if [ $sysName == 'Darwin' ]; then
@ -48,7 +50,7 @@ fi
echo "$sourcePath/php/php-src-php-${version}" echo "$sourcePath/php/php-src-php-${version}"
if [ ! -d $serverPath/php/74 ];then if [ ! -d $serverPath/php/74 ];then
cd $sourcePath/php/php-src-php-${version} cd $sourcePath/php/php74
./buildconf --force ./buildconf --force
./configure \ ./configure \
--prefix=$serverPath/php/74 \ --prefix=$serverPath/php/74 \

@ -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", "shell": "opcache.sh",
"check": "opcache.so" "check": "opcache.so"
}, },
{
"name": "pcntl",
"versions": [
"74"
],
"type": "缓存器",
"msg": "用于加速PHP脚本!",
"shell": "pcntl.sh",
"check": "pcntl.so"
},
{ {
"name": "intl", "name": "intl",
"versions": [ "versions": [

Loading…
Cancel
Save