From f66de0ef78eb762f47603d26df8a783076ec9ff8 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 30 Nov 2019 18:28:34 +0800 Subject: [PATCH] up --- README.md | 8 ++++++-- plugins/php/versions/53/install.sh | 16 +++++++--------- plugins/php/versions/54/install.sh | 18 ++++++++---------- plugins/php/versions/55/install.sh | 14 +++++++------- plugins/php/versions/56/install.sh | 15 +++++++-------- plugins/php/versions/70/install.sh | 17 ++++++++--------- plugins/php/versions/71/install.sh | 9 ++++----- plugins/php/versions/72/install.sh | 9 ++++----- plugins/php/versions/73/install.sh | 6 +++--- plugins/php/versions/74/install.sh | 6 +++--- 10 files changed, 57 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 3b0cb6588..47e24affe 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -### mdserver-web 0.7.3 +### mdserver-web 0.8.0 简单的Linux面板,感谢BT.CN写出如此好的web管理软件。我一看到,就知道这是我一直想要的页面化管理方式。 复制了后台管理界面,按照自己想要的方式写了一版。 @@ -13,7 +13,7 @@ ### 主要插件介绍 * OpenResty - 轻量级,占有内存少,并发能力强。 -* PHP - PHP是世界上最好的编程语言。 +* PHP[53-74] - PHP是世界上最好的编程语言。 * MySQL - MySQL是一种关系数据库管理系统。 * phpMyAdmin - 著名Web端MySQL管理工具。 * Memcached - 一个高性能的分布式内存对象缓存系统。 @@ -23,6 +23,10 @@ * Gogs - 一款极易搭建的自助Git服务。 * Rsyncd - 通用同步服务。 +### 版本更新 0.8.0 +* 添加PHP74版本 +* 优化PHP及扩展安装脚本 + ### 自动安装 ``` curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/install.sh | sh diff --git a/plugins/php/versions/53/install.sh b/plugins/php/versions/53/install.sh index 5648e078a..261df537a 100755 --- a/plugins/php/versions/53/install.sh +++ b/plugins/php/versions/53/install.sh @@ -10,8 +10,9 @@ sourcePath=${serverPath}/source sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl -echo $rootPath +version=5.3.29 +PHP_VER=53 Install_php() { #------------------------ install start ------------------------------------# @@ -19,12 +20,10 @@ echo "安装php-5.3.29 ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php -if [ ! -f $sourcePath/php/php-5.3.29.tar.xz ];then - wget --no-check-certificate -O $sourcePath/php/php-5.3.29.tar.xz https://museum.php.net/php5/php-5.3.29.tar.xz -fi - -if [ ! -d $sourcePath/php/php-5.3.29 ];then - cd $sourcePath/php && tar -Jxf $sourcePath/php/php-5.3.29.tar.xz +if [ ! -d $sourcePath/php/php${PHP_VER} ];then + wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz http://au1.php.net/distributions/php-${version}.tar.xz + cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz + mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER} fi @@ -55,8 +54,7 @@ fi if [ ! -d $serverPath/php/53 ];then -# --enable-intl \ - cd $sourcePath/php/php-5.3.29 && ./configure \ + cd $sourcePath/php/php${PHP_VER} && ./configure \ --prefix=$serverPath/php/53 \ --exec-prefix=$serverPath/php/53 \ --with-config-file-path=$serverPath/php/53/etc \ diff --git a/plugins/php/versions/54/install.sh b/plugins/php/versions/54/install.sh index 13ab92fde..ab48472ff 100755 --- a/plugins/php/versions/54/install.sh +++ b/plugins/php/versions/54/install.sh @@ -11,23 +11,21 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl - +version=5.4.45 +PHP_VER=54 Install_php() { #------------------------ install start ------------------------------------# -echo "安装php-5.4.45 ..." > $install_tmp +echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php -if [ ! -f $sourcePath/php/php-5.4.45.tar.gz ];then - wget --no-check-certificate -O $sourcePath/php/php-5.4.45.tar.gz https://museum.php.net/php5/php-5.4.45.tar.gz -fi - -if [ ! -d $sourcePath/php/php-5.4.45 ];then - cd $sourcePath/php && tar -zvxf $sourcePath/php/php-5.4.45.tar.gz +if [ ! -d $sourcePath/php/php${PHP_VER} ];then + wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.gz http://au1.php.net/distributions/php-${version}.tar.gz + cd $sourcePath/php && tar -zxvf $sourcePath/php/php-${version}.tar.gz + mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER} fi - OPTIONS='' if [ $sysName == 'Darwin' ]; then OPTIONS='--without-iconv' @@ -41,7 +39,7 @@ else fi if [ ! -d $serverPath/php/54 ];then - cd $sourcePath/php/php-5.4.45 && ./configure \ + cd $sourcePath/php/php${PHP_VER} && ./configure \ --prefix=$serverPath/php/54 \ --exec-prefix=$serverPath/php/54 \ --with-config-file-path=$serverPath/php/54/etc \ diff --git a/plugins/php/versions/55/install.sh b/plugins/php/versions/55/install.sh index d0be55bc6..74d151275 100755 --- a/plugins/php/versions/55/install.sh +++ b/plugins/php/versions/55/install.sh @@ -10,6 +10,8 @@ sourcePath=${serverPath}/source sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl +version=5.5.38 +PHP_VER=55 Install_php() { #------------------------ install start ------------------------------------# @@ -17,12 +19,10 @@ echo "安装php-5.5.38 ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php -if [ ! -f $sourcePath/php/php-5.5.38.tar.xz ];then - wget --no-check-certificate -O $sourcePath/php/php-5.5.38.tar.xz https://museum.php.net/php5/php-5.5.38.tar.xz -fi - -if [ ! -d $sourcePath/php/php-5.5.38 ];then - cd $sourcePath/php && tar -Jxf $sourcePath/php/php-5.5.38.tar.xz +if [ ! -d $sourcePath/php/php${PHP_VER} ];then + wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz http://au1.php.net/distributions/php-${version}.tar.xz + cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz + mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER} fi OPTIONS='' @@ -38,7 +38,7 @@ else fi if [ ! -d $serverPath/php/55 ];then - cd $sourcePath/php/php-5.5.38 && ./configure \ + cd $sourcePath/php/php${PHP_VER} && ./configure \ --prefix=$serverPath/php/55 \ --exec-prefix=$serverPath/php/55 \ --with-config-file-path=$serverPath/php/55/etc \ diff --git a/plugins/php/versions/56/install.sh b/plugins/php/versions/56/install.sh index 259943556..83d155d60 100755 --- a/plugins/php/versions/56/install.sh +++ b/plugins/php/versions/56/install.sh @@ -10,7 +10,8 @@ sourcePath=${serverPath}/source sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl - +version=5.6.36 +PHP_VER=56 Install_php() { #------------------------ install start ------------------------------------# @@ -18,12 +19,10 @@ echo "安装php-5.6.36 ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php -if [ ! -f $sourcePath/php/php-5.6.36.tar.xz ];then - wget --no-check-certificate -O $sourcePath/php/php-5.6.36.tar.xz https://museum.php.net/php5/php-5.6.36.tar.xz -fi - -if [ ! -d $sourcePath/php/php-5.6.36 ];then - cd $sourcePath/php && tar -Jxf $sourcePath/php/php-5.6.36.tar.xz +if [ ! -d $sourcePath/php/php${PHP_VER} ];then + wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz http://au1.php.net/distributions/php-${version}.tar.xz + cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz + mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER} fi OPTIONS='' @@ -39,7 +38,7 @@ else fi if [ ! -d $serverPath/php/56 ];then - cd $sourcePath/php/php-5.6.36 && ./configure \ + cd $sourcePath/php/php${PHP_VER} && ./configure \ --prefix=$serverPath/php/56 \ --exec-prefix=$serverPath/php/56 \ --with-config-file-path=$serverPath/php/56/etc \ diff --git a/plugins/php/versions/70/install.sh b/plugins/php/versions/70/install.sh index 1ba1212e0..87f08eda4 100755 --- a/plugins/php/versions/70/install.sh +++ b/plugins/php/versions/70/install.sh @@ -10,20 +10,19 @@ sourcePath=${serverPath}/source sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl - +version=7.0.30 +PHP_VER=70 Install_php() { #------------------------ install start ------------------------------------# -echo "安装php-7.0.30 ..." > $install_tmp +echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php -if [ ! -f $sourcePath/php/php-7.0.30.tar.xz ];then - wget --no-check-certificate -O $sourcePath/php/php-7.0.30.tar.xz https://museum.php.net/php7/php-7.0.30.tar.xz -fi - -if [ ! -d $sourcePath/php/php-7.0.30 ];then - cd $sourcePath/php && tar -Jxf $sourcePath/php/php-7.0.30.tar.xz +if [ ! -d $sourcePath/php/php${PHP_VER} ];then + wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz http://au1.php.net/distributions/php-${version}.tar.xz + cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz + mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER} fi OPTIONS='' @@ -39,7 +38,7 @@ else fi if [ ! -d $serverPath/php/70 ];then - cd $sourcePath/php/php-7.0.30 && ./configure \ + cd $sourcePath/php/php${PHP_VER} && ./configure \ --prefix=$serverPath/php/70 \ --exec-prefix=$serverPath/php/70 \ --with-config-file-path=$serverPath/php/70/etc \ diff --git a/plugins/php/versions/71/install.sh b/plugins/php/versions/71/install.sh index 2076910de..103ae2d0e 100755 --- a/plugins/php/versions/71/install.sh +++ b/plugins/php/versions/71/install.sh @@ -11,6 +11,7 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl version=7.1.33 +PHP_VER=71 Install_php() { #------------------------ install start ------------------------------------# @@ -18,12 +19,10 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php -if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then +if [ ! -d $sourcePath/php/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${PHP_VER} fi OPTIONS='' @@ -38,7 +37,7 @@ else fi if [ ! -d $serverPath/php/71 ];then - cd $sourcePath/php/php-${version} && ./configure \ + cd $sourcePath/php/php${PHP_VER} && ./configure \ --prefix=$serverPath/php/71 \ --exec-prefix=$serverPath/php/71 \ --with-config-file-path=$serverPath/php/71/etc \ diff --git a/plugins/php/versions/72/install.sh b/plugins/php/versions/72/install.sh index 44dd1eb2c..4009009d7 100755 --- a/plugins/php/versions/72/install.sh +++ b/plugins/php/versions/72/install.sh @@ -12,6 +12,7 @@ install_tmp=${rootPath}/tmp/mw_install.pl version=7.2.25 +PHP_VER=72 Install_php() { #------------------------ install start ------------------------------------# @@ -19,12 +20,10 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php -if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then +if [ ! -d $sourcePath/php/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${PHP_VER} fi OPTIONS='' @@ -39,7 +38,7 @@ else fi if [ ! -d $serverPath/php/72 ];then - cd $sourcePath/php/php-${version} && ./configure \ + cd $sourcePath/php/php${PHP_VER} && ./configure \ --prefix=$serverPath/php/72 \ --exec-prefix=$serverPath/php/72 \ --with-config-file-path=$serverPath/php/72/etc \ diff --git a/plugins/php/versions/73/install.sh b/plugins/php/versions/73/install.sh index 140631184..23e7b56d0 100755 --- a/plugins/php/versions/73/install.sh +++ b/plugins/php/versions/73/install.sh @@ -20,10 +20,10 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php -if [ ! -f $sourcePath/php/${PHP_VER} ];then +if [ ! -d $sourcePath/php/php${PHP_VER} ];then wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz http://au1.php.net/distributions/php-${version}.tar.xz cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz - mv $sourcePath/php/php-${version} $sourcePath/php/${PHP_VER} + mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER} fi OPTIONS='' @@ -42,7 +42,7 @@ fi if [ ! -d $serverPath/php/73 ];then - cd $sourcePath/php/${PHP_VER} && ./configure \ + cd $sourcePath/php/php${PHP_VER} && ./configure \ --prefix=$serverPath/php/73 \ --exec-prefix=$serverPath/php/73 \ --with-config-file-path=$serverPath/php/73/etc \ diff --git a/plugins/php/versions/74/install.sh b/plugins/php/versions/74/install.sh index d3d200d60..f7ae21dba 100755 --- a/plugins/php/versions/74/install.sh +++ b/plugins/php/versions/74/install.sh @@ -12,6 +12,7 @@ install_tmp=${rootPath}/tmp/mw_install.pl version=7.4.0 +PHP_VER=74 Install_php() { #------------------------ install start ------------------------------------# @@ -19,11 +20,10 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php -if [ ! -d $sourcePath/php/php74 ];then +if [ ! -d $sourcePath/php/php${PHP_VER} ];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 + mv $sourcePath/php/php-src-php-${version} $sourcePath/php/php${PHP_VER} fi cd $sourcePath/php/php74