diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index e2c0fb068..92954192e 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -30,8 +30,6 @@ Install_openresty() mkdir -p ${openrestyDir} echo '正在安装脚本文件...' > $install_tmp - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash zlib.sh - if [ ! -f ${openrestyDir}/openresty-${VERSION}.tar.gz ];then wget -O ${openrestyDir}/openresty-${VERSION}.tar.gz https://openresty.org/download/openresty-${VERSION}.tar.gz fi @@ -40,19 +38,19 @@ Install_openresty() cd ${openrestyDir} && tar -zxvf openresty-${VERSION}.tar.gz # --with-openssl=$serverPath/source/lib/openssl-1.0.2q - cd ${openrestyDir}/openresty-${VERSION} && ./configure --prefix=$serverPath/openresty \ + cd ${openrestyDir}/openresty-${VERSION} && ./configure \ + --prefix=$serverPath/openresty \ --with-http_v2_module \ --with-http_ssl_module \ --with-http_slice_module \ - --with-http_stub_status_module \ - --with-zlib=$serverPath/lib/zlib + --with-http_stub_status_module - make && make install && make clean - echo "${VERSION}" > $serverPath/openresty/version.pl + gmake && gmake install && make clean - if [ -d $serverPath/openresty/nginx/conf ];then + if [ -d $serverPath/openresty ];then + echo "${VERSION}" > $serverPath/openresty/version.pl echo "" > $serverPath/openresty/nginx/conf/enable-php-00.conf - fi + fi echo '安装完成' > $install_tmp } diff --git a/plugins/openresty/lib/zlib.sh b/plugins/openresty/lib/zlib.sh deleted file mode 100644 index ab6b4c50a..000000000 --- a/plugins/openresty/lib/zlib.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/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") - -# echo $rootPath - -SERVER_ROOT=$rootPath/lib -SOURCE_ROOT=$rootPath/source/lib - -if [ ! -d ${SERVER_ROOT}/zlib ];then - - cd $SOURCE_ROOT - if [ ! -f ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then - wget -O zlib-1.2.11.tar.gz --no-check-certificate https://github.com/madler/zlib/archive/v1.2.11.tar.gz -T 20 - fi - - tar -zxvf zlib-1.2.11.tar.gz - cd zlib-1.2.11 - - ./configure --prefix=${SERVER_ROOT}/zlib && make && make install - - #cd $SOURCE_ROOT - #rm -rf zlib-1.2.11 - #rm -rf zlib-1.2.11.tar.gz -fi \ No newline at end of file diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 5a8199ec2..d792c083e 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -3,6 +3,14 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 +# RED='\e[1;31m' # 红色 +# GREEN='\e[1;32m' # 绿色 +# YELLOW='\e[1;33m' # 黄色 +# BLUE='\e[1;34m' # 蓝色 +# PURPLE='\e[1;35m' # 紫色 +# CYAN='\e[1;36m' # 蓝绿色 +# WHITE='\e[1;37m' # 白色 +# NC='\e[0m' # 没有颜色 apt update -y @@ -63,6 +71,20 @@ systemctl stop firewalld cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data + +#fix zlib1g-dev fail +echo -e "\e[0;32mfix zlib1g-dev install question\e[0m" +Install_TmpFile=/tmp/debian-fix-zlib1g-dev.txt +apt install -y zlib1g-dev > ${Install_TmpFile} +if [ "$?" != "0" ];then + ZLIB1G_BASE_VER=$(cat ${Install_TmpFile} | grep zlib1g | awk -F "=" '{print $2}' | awk -F ")" '{print $1}') + echo "1${ZLIB1G_BASE_VER}1" +# apt install zlib1g=1:1.2.11.dfsg-2 zlib1g-dev +fi +echo "\e[0;32mfix zlib1g-dev install question\e[0m" + + + if [ ! -f /usr/local/bin/pip3 ];then python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple fi diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 4b914988f..37462fa8b 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -44,6 +44,7 @@ elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; th yum install -y wget zip unzip elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then OSNAME='debian' + apt install -y devscripts apt install -y wget zip unzip elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' diff --git a/scripts/lib.sh b/scripts/lib.sh index 4574326a9..38bcda714 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -302,7 +302,8 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libxml2 libxml2-dev libbz2-dev libmcrypt-dev libpspell-dev librecode-dev apt install -y libgmp-dev libgmp3-dev libreadline-dev libxpm-dev - apt install -y zlib1g-dev dia pkg-config + apt install -y dia pkg-config + apt install -y zlib1g-dev apt install -y libjpeg-dev libpng-dev apt install -y libfreetype6 apt install -y libjpeg62-turbo-dev