pull/109/head
Mr Chen 6 years ago
parent b40cb7b4ea
commit 1724620242
  1. 2
      plugins/php/info.json
  2. 21
      plugins/php/versions/53/memcache.sh
  3. 16
      plugins/php/versions/53/memcached.sh
  4. 4
      plugins/php/versions/53/opcache.sh
  5. 30
      plugins/php/versions/53/yaf.sh
  6. 18
      plugins/php/versions/71/install.sh
  7. 22
      plugins/php/versions/72/install.sh
  8. 22
      plugins/php/versions/73/install.sh
  9. 96
      plugins/php/versions/73/yaf.sh
  10. 129
      plugins/php/versions/phplib.conf

@ -6,7 +6,7 @@
"title": "PHP",
"coexist": true,
"versions": ["53","54","55","56","70","71","72","73"],
"updates": ["5.3.17","5.4.45","5.6.36","7.0.30","7.1.","7.2.0"],
"updates": ["5.3.17","5.4.45","5.6.36","7.0.30","7.1.27","7.2.16","7.3.3"],
"tip": "soft",
"checks": "server/php/VERSION/bin/php",
"path": "server/php/VERSION",

@ -12,6 +12,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=memcache
LIBV=2.2.7
sysName=`uname`
actionType=$1
version=$2
@ -25,16 +26,14 @@ Install_lib()
return
fi
if [ ! -f "$extFile" ];then
php_lib=$sourcePath/php_${version}_lib
mkdir -p $php_lib
wget -O $php_lib/memcache-2.2.7.tgz http://pecl.php.net/get/memcache-2.2.7.tgz
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
cd $php_lib && tar xvf memcache-2.2.7.tgz
cd memcache-2.2.7
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
make && make install
@ -48,7 +47,8 @@ Install_lib()
echo "ERROR!"
return
fi
echo "extension=memcache.so" >> $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 '==========================================================='
@ -59,17 +59,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 未安装${LIBNAME},请选择其它版本!"
echo "php-$vphp not install memcache, Plese select other version!"
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
echo "php-$version not install memcache, Plese select other version!"
return
fi
sed -i '_bak' '/memcache.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

@ -12,6 +12,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=memcached
LIBV=2.2.0
sysName=`uname`
actionType=$1
version=$2
@ -31,10 +32,10 @@ Install_lib()
php_lib=$sourcePath/php_${version}_lib
mkdir -p $php_lib
wget -O $php_lib/${LIBNAME}-2.2.0.tgz http://pecl.php.net/get/${LIBNAME}-2.2.0.tgz
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
cd $php_lib && tar xvf ${LIBNAME}-2.2.0.tgz
cd ${LIBNAME}-2.2.0
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 \
@ -42,7 +43,7 @@ Install_lib()
make && make install
cd $php_lib
rm -rf memcached-*
rm -rf ${LIBNAME}-*
rm -f package.xml
fi
@ -61,17 +62,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 未安装${LIBNAME},请选择其它版本!"
echo "php-$vphp not install ${LIBNAME}, Plese select other version!"
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

@ -68,7 +68,7 @@ Install_lib()
Uninstall_lib()
{
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then
echo "php$version 未安装,请选择其它版本!"
echo "php-$version 未安装,请选择其它版本!"
return
fi
@ -76,7 +76,7 @@ Uninstall_lib()
sed -i '_bak' "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini
if [ ! -f "$extFile" ];then
echo "php$version 未安装${LIBNAME},请选择其它版本!"
echo "php-$version 未安装${LIBNAME},请选择其它版本!"
echo "php-$version not install ${LIBNAME}, Plese select other version!"
return
fi

@ -11,14 +11,22 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source/php
LIBNAME=yaf
LIBV='2.3.5'
actionType=$1
version=$2
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/yaf.so
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then
LIBV='3.0.7';
fi
Install_lib()
{
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep 'yaf.so'`
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
if [ "${isInstall}" != "" ];then
echo "php-$version 已安装yaf,请选择其它版本!"
return
@ -26,18 +34,16 @@ Install_lib()
if [ ! -f "$extFile" ];then
wafV='2.3.5';
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ];then
wafV='3.0.7';
fi
php_lib=$sourcePath/php_${version}_lib
mkdir -p $php_lib
wget -O $php_lib/yaf-$wafV.tgz http://pecl.php.net/get/yaf-$wafV.tgz
wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz
cd $php_lib
tar xvf yaf-$wafV.tgz
cd yaf-$wafV
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
@ -72,9 +78,9 @@ Uninstall_lib()
fi
echo $serverPath/php/$version/etc/php.ini
sed -i '_bak' '/yaf.so/d' $serverPath/php/$version/etc/php.ini
sed -i '_bak' '/yaf.use_namespace/d' $serverPath/php/$version/etc/php.ini
sed -i '_bak' '/\[yaf\]/d' $serverPath/php/$version/etc/php.ini
sed -i '_bak' "/yaf.so/d" $serverPath/php/$version/etc/php.ini
sed -i '_bak' "/yaf.use_namespace/d" $serverPath/php/$version/etc/php.ini
sed -i '_bak' "/\[yaf\]/d" $serverPath/php/$version/etc/php.ini
rm -f $extFile
$serverPath/php/init.d/php$version reload

@ -15,27 +15,27 @@ install_tmp=${rootPath}/tmp/bt_install.pl
# echo ${serverPath}
# echo ${install_tmp}
version=7.1.27
Install_php()
{
#------------------------ install start ------------------------------------#
echo "安装php-7.1.17 ..." > $install_tmp
echo "安装php-${version} ..." > $install_tmp
mkdir -p $sourcePath/php
mkdir -p $serverPath/php
if [ ! -f $sourcePath/php/php-7.1.17.tar.xz ];then
wget -O $sourcePath/php/php-7.1.17.tar.xz https://museum.php.net/php7/php-7.1.17.tar.xz
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
wget -O $sourcePath/php/php-${version}.tar.xz http://au1.php.net/distributions/php-${version}.tar.xz
fi
if [ ! -d $sourcePath/php/php-7.1.17 ];then
cd $sourcePath/php && tar -Jxf $sourcePath/php/php-7.1.17.tar.xz
if [ ! -d $sourcePath/php/php-${version} ];then
cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz
fi
cd $sourcePath/php/php-7.1.17 && ./configure \
cd $sourcePath/php/php-${version} && ./configure \
--prefix=$serverPath/php/71 \
--exec-prefix=$serverPath/php/71 \
--with-config-file-path=$serverPath/php/72/etc \
--with-config-file-path=$serverPath/php/71/etc \
--with-zlib-dir=$serverPath/lib/zlib \
--enable-mysqlnd \
--without-iconv \
@ -54,7 +54,7 @@ cd $sourcePath/php/php-7.1.17 && ./configure \
Uninstall_php()
{
rm -rf $serverPath/php/71
echo "卸载php-7.2.5 ..." > $install_tmp
echo "卸载php-${version}..." > $install_tmp
}
action=${1}

@ -10,29 +10,25 @@ sourcePath=${serverPath}/source
install_tmp=${rootPath}/tmp/bt_install.pl
# echo $curPath
# echo ${1}
# echo ${serverPath}
# echo ${install_tmp}
version=7.2.16
Install_php()
{
#------------------------ install start ------------------------------------#
echo "安装php-7.2.5 ..." > $install_tmp
echo "安装php-${version} ..." > $install_tmp
mkdir -p $sourcePath/php
mkdir -p $serverPath/php
if [ ! -f $sourcePath/php/php-7.2.5.tar.xz ];then
wget -O $sourcePath/php/php-7.2.5.tar.xz https://museum.php.net/php7/php-7.2.5.tar.xz
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
wget -O $sourcePath/php/php-${version}.tar.xz http://au1.php.net/distributions/php-${version}.tar.xz
fi
if [ ! -d $sourcePath/php/php-7.2.5 ];then
cd $sourcePath/php && tar -Jxf $sourcePath/php/php-7.2.5.tar.xz
if [ ! -d $sourcePath/php/php-${version} ];then
cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz
fi
cd $sourcePath/php/php-7.2.5 && ./configure \
cd $sourcePath/php/php-${version} && ./configure \
--prefix=$serverPath/php/72 \
--exec-prefix=$serverPath/php/72 \
--with-config-file-path=$serverPath/php/72/etc \
@ -51,12 +47,10 @@ cd $sourcePath/php/php-7.2.5 && ./configure \
#------------------------ install end ------------------------------------#
}
Uninstall_php()
{
rm -rf $serverPath/php/72
echo "卸载php-7.2.5 ..." > $install_tmp
echo "卸载php-${version}..." > $install_tmp
}
action=${1}

@ -10,29 +10,25 @@ sourcePath=${serverPath}/source
install_tmp=${rootPath}/tmp/bt_install.pl
# echo $curPath
# echo ${1}
# echo ${serverPath}
# echo ${install_tmp}
version=7.3.3
Install_php()
{
#------------------------ install start ------------------------------------#
echo "安装php-7.3.2 ..." > $install_tmp
echo "安装php-${version} ..." > $install_tmp
mkdir -p $sourcePath/php
mkdir -p $serverPath/php
if [ ! -f $sourcePath/php/php-7.3.2.tar.xz ];then
wget -O $sourcePath/php/php-7.3.2.tar.xz http://au1.php.net/distributions/php-7.3.2.tar.xz
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
wget -O $sourcePath/php/php-${version}.tar.xz http://au1.php.net/distributions/php-${version}.tar.xz
fi
if [ ! -d $sourcePath/php/php-7.3.2 ];then
cd $sourcePath/php && tar -Jxf $sourcePath/php/php-7.3.2.tar.xz
if [ ! -d $sourcePath/php/php-${version} ];then
cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz
fi
cd $sourcePath/php/php-7.3.2 && ./configure \
cd $sourcePath/php/php-${version} && ./configure \
--prefix=$serverPath/php/73 \
--exec-prefix=$serverPath/php/73 \
--with-config-file-path=$serverPath/php/73/etc \
@ -51,12 +47,10 @@ cd $sourcePath/php/php-7.3.2 && ./configure \
#------------------------ install end ------------------------------------#
}
Uninstall_php()
{
rm -rf $serverPath/php/73
echo "卸载php-7.3.2 ..." > $install_tmp
echo "卸载php-${version}..." > $install_tmp
}
action=${1}

@ -0,0 +1,96 @@
#!/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=yaf
LIBV='2.3.5'
actionType=$1
version=$2
extFile=$serverPath/php/${version}/lib/php/extensions/no-debug-non-zts-20090626/yaf.so
if [ "$version" = '70' ] || [ "$version" = '71' ] || [ "$version" = '72' ] || [ "$version" = '73' ];then
LIBV='3.0.7'
fi
Install_lib()
{
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"`
if [ "${isInstall}" != "" ];then
echo "php-$version 已安装yaf,请选择其它版本!"
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 ..
rm -rf yaf-*
rm -f package.xml
fi
if [ ! -f "$extFile" ];then
echo "ERROR!"
return;
fi
echo -e "[yaf]\nextension=yaf.so\nyaf.use_namespace=1" >> $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 未安装yaf,请选择其它版本!"
return
fi
echo $serverPath/php/$version/etc/php.ini
sed -i '_bak' "/yaf.so/d" $serverPath/php/$version/etc/php.ini
sed -i '_bak' "/yaf.use_namespace/d" $serverPath/php/$version/etc/php.ini
sed -i '_bak' "/\[yaf\]/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

@ -197,7 +197,9 @@
"55",
"56",
"70",
"71"
"71",
"72",
"73"
],
"type": "框架",
"msg": "Yaf是一个C语言编写的PHP框架",
@ -227,130 +229,5 @@
"msg": "高性能无锁共享内存Cache",
"shell": "yac.sh",
"check": "yac.so"
},
{
"name": "readline",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "readline.sh",
"check": "readline.so"
},
{
"name": "snmp",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "snmp.sh",
"check": "snmp.so"
},
{
"name": "recode",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "recode.sh",
"check": "recode.so"
},
{
"name": "enchant",
"versions": [
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "enchant.sh",
"check": "enchant.so"
},
{
"name": "pspell",
"versions": [
"52",
"53",
"54",
"55",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "pspell.sh",
"check": "pspell.so"
},
{
"name": "bz2",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "bz2.sh",
"check": "bz2.so"
},
{
"name": "calendar",
"versions": [
"52",
"53",
"54",
"55",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "calendar.sh",
"check": "calendar.so"
},
{
"name": "gmp",
"versions": [
"52",
"53",
"54",
"55",
"56",
"70",
"71"
],
"type": "通用扩展",
"msg": "php官方扩展",
"shell": "gmp.sh",
"check": "gmp.so"
}
]
Loading…
Cancel
Save