mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 05:59:25 +08:00
debug zlib1g
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
+2
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user