mirror of
https://github.com/midoks/mdserver-web
synced 2026-11-04 18:55:59 +08:00
update
This commit is contained in:
@@ -39,7 +39,7 @@ Install_App()
|
||||
|
||||
|
||||
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
if [ $sysName = 'Darwin' ]; then
|
||||
wget --no-check-certificate -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
|
||||
else
|
||||
curl -sSLo ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
|
||||
@@ -53,7 +53,7 @@ Install_App()
|
||||
|
||||
cd ${APP_DIR} && tar -zxvf haproxy-${VERSION}.tar.gz
|
||||
|
||||
if [ "$OSNAME" == "macos" ];then
|
||||
if [ "$OSNAME" = "macos" ];then
|
||||
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
|
||||
else
|
||||
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
|
||||
|
||||
@@ -53,7 +53,7 @@ Install_App()
|
||||
|
||||
cd ${APP_DIR} && tar -zxvf haproxy-${VERSION}.tar.gz
|
||||
|
||||
if [ "$OSNAME" == "macos" ];then
|
||||
if [ "$OSNAME" = "macos" ];then
|
||||
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
|
||||
else
|
||||
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
|
||||
|
||||
@@ -65,7 +65,7 @@ Install_app()
|
||||
fi
|
||||
|
||||
OPTIONS=''
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
OPTIONS='-DPLUGIN_TOKUDB=NO'
|
||||
fi
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ Uninstall_app()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_app
|
||||
else
|
||||
Uninstall_app
|
||||
|
||||
@@ -34,7 +34,7 @@ echo "use system: ${sysName}"
|
||||
|
||||
OSNAME=`bash ${rootPath}/scripts/getos.sh`
|
||||
|
||||
if [ "" == "$OSNAME" ];then
|
||||
if [ "" = "$OSNAME" ];then
|
||||
OSNAME=`cat ${rootPath}/data/osname.pl`
|
||||
fi
|
||||
|
||||
|
||||
@@ -20,11 +20,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "82" ];then
|
||||
SYS_NAME="82"
|
||||
fi
|
||||
|
||||
@@ -15,7 +15,7 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "82" ];then
|
||||
SYS_NAME="82"
|
||||
fi
|
||||
@@ -70,7 +70,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
|
||||
@@ -47,7 +47,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -67,11 +67,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.16.1
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@ fi
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
|
||||
@@ -54,11 +54,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -71,11 +71,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-suse${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
@@ -46,7 +46,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "90" ];then
|
||||
SYS_NAME="90"
|
||||
fi
|
||||
@@ -64,7 +64,7 @@ rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -84,11 +84,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
|
||||
@@ -34,7 +34,7 @@ if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.zip
|
||||
|
||||
@@ -48,7 +48,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -68,11 +68,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-ubuntu${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ if [ "$SYS_NAME" -lt "11" ];then
|
||||
SYS_NAME="11"
|
||||
fi
|
||||
|
||||
if [ "$SYS_NAME" == "" ];then
|
||||
if [ "$SYS_NAME" = "" ];then
|
||||
SYS_NAME="11"
|
||||
fi
|
||||
|
||||
@@ -73,7 +73,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "90" ];then
|
||||
SYS_NAME="90"
|
||||
fi
|
||||
@@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
@@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -62,11 +62,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-debian${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
|
||||
SYS_NAME=${SYS_VERSION_ID/./}
|
||||
SYS_NAME_LEN=`echo "$SYS_NAME" | wc -L`
|
||||
|
||||
if [ "$SYS_NAME_LEN" == "1" ];then
|
||||
if [ "$SYS_NAME_LEN" = "1" ];then
|
||||
SYS_NAME=${SYS_NAME}0
|
||||
fi
|
||||
|
||||
if [ "$SYS_ARCH" == "aarch64" ];then
|
||||
if [ "$SYS_ARCH" = "aarch64" ];then
|
||||
if [ "$SYS_NAME" -gt "90" ];then
|
||||
SYS_NAME="90"
|
||||
fi
|
||||
@@ -63,7 +63,7 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME}
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-linux-arm64
|
||||
fi
|
||||
TOOL_FILE_NAME_TGZ=${TOOL_FILE_NAME}.tgz
|
||||
@@ -85,11 +85,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
#--------------- mongodb database install ------------------ #
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-aarch64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-rhel${SYS_NAME}-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ fi
|
||||
#--------------- mongosh tool install ------------------ #
|
||||
TOOL_VERSION=2.2.5
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-x64
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongosh-${TOOL_VERSION}-darwin-arm64
|
||||
fi
|
||||
|
||||
@@ -65,11 +65,11 @@ cd ${MG_DIR} && rm -rf ${MG_DIR}/${TOOL_FILE_NAME}
|
||||
# https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zip
|
||||
TOOL_VERSION=100.9.4
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-x86_64-${TOOL_VERSION}
|
||||
if [ "aarch64" == ${SYS_ARCH} ];then
|
||||
if [ "aarch64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
if [ "arm64" == ${SYS_ARCH} ];then
|
||||
if [ "arm64" = ${SYS_ARCH} ];then
|
||||
TOOL_FILE_NAME=mongodb-database-tools-macos-arm64-${TOOL_VERSION}
|
||||
fi
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ Uninstall_App()
|
||||
rm -rf $serverPath/msonedrive
|
||||
}
|
||||
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
elif [ "${1}" == 'uninstall' ];then
|
||||
elif [ "${1}" = 'uninstall' ];then
|
||||
Uninstall_App
|
||||
else
|
||||
echo 'Error!';
|
||||
|
||||
@@ -100,7 +100,7 @@ Install_app()
|
||||
apt install -y golang golang-src
|
||||
fi
|
||||
|
||||
if [ "$sysName" == "darwin" ]; then
|
||||
if [ "$sysName" = "darwin" ]; then
|
||||
ARCH=arm64
|
||||
DOWNLOAD_URL="https://github.com/9seconds/mtg/releases/download/$VERSION/mtg-${VERSION_MIN}-${sysName}-arm64.tar.gz"
|
||||
elif [ "$sysName" != "macos" ]; then
|
||||
|
||||
@@ -43,7 +43,7 @@ fi
|
||||
|
||||
_os=`uname`
|
||||
echo "use system: ${_os}"
|
||||
if [ ${_os} == "Darwin" ]; then
|
||||
if [ ${_os} = "Darwin" ]; then
|
||||
OSNAME='macos'
|
||||
elif grep -Eq "openSUSE" /etc/*-release; then
|
||||
OSNAME='opensuse'
|
||||
@@ -111,7 +111,7 @@ if [[ "$OSNAME" == "debian" ]] && [[ "$VERSION_ID" =~ "13" ]]; then
|
||||
cd $cur_dir
|
||||
fi
|
||||
|
||||
if [ "${2}" == "" ];then
|
||||
if [ "${2}" = "" ];then
|
||||
echo '缺少安装脚本...'
|
||||
exit 0
|
||||
fi
|
||||
@@ -121,7 +121,7 @@ if [ ! -d $curPath/versions/$2 ];then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${action}" == "uninstall" ];then
|
||||
if [ "${action}" = "uninstall" ];then
|
||||
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/mysql-community/index.py stop ${type}
|
||||
cd ${rootPath} && python3 ${rootPath}/plugins/mysql-community/index.py initd_uninstall ${type}
|
||||
@@ -139,7 +139,7 @@ fi
|
||||
|
||||
sh -x $curPath/versions/$2/install_generic.sh $1
|
||||
|
||||
if [ "${action}" == "install" ];then
|
||||
if [ "${action}" = "install" ];then
|
||||
#初始化
|
||||
|
||||
if [ "$?" != "0" ];then
|
||||
|
||||
@@ -73,7 +73,7 @@ Uninstall_mysql()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_mysql
|
||||
else
|
||||
Uninstall_mysql
|
||||
|
||||
@@ -152,13 +152,13 @@ Install_mysql()
|
||||
cd ${mysqlDir}/mysql-5.5.62 && patch -p1 < ${rootPath}/plugins/mysql/patch/mysql-5.5-fix-arm-client_plugin.patch
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
Install_dep
|
||||
fi
|
||||
|
||||
OPTIONS=''
|
||||
|
||||
if [ "$OSNAME" == "debian" ] && [ "$VERSION_ID" == "13" ];then
|
||||
if [ "$OSNAME" = "debian" ] && [ "$VERSION_ID" = "13" ];then
|
||||
Install_dep_debain13
|
||||
# export CFLAGS="-D__s64=long long -D__u64='unsigned long long' -D__s32=int -D__u32='unsigned int' -D__u16='unsigned short'"
|
||||
# export CXXFLAGS="$CFLAGS"
|
||||
|
||||
@@ -174,11 +174,11 @@ Install_mysql()
|
||||
WHERE_DIR_GPP=`which g++`
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
Install_dep
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "debian" ] && [ "$VERSION_ID" == "13" ];then
|
||||
if [ "$OSNAME" = "debian" ] && [ "$VERSION_ID" = "13" ];then
|
||||
Install_dep_debain13
|
||||
fi
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ Install_mysql()
|
||||
|
||||
WHERE_DIR_GCC=/usr/bin/gcc
|
||||
WHERE_DIR_GPP=/usr/bin/g++
|
||||
if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then
|
||||
if [ "$OSNAME" = "centos" ] && [ "$VERSION_ID" = "7" ];then
|
||||
yum install -y libudev-devel
|
||||
yum install -y centos-release-scl
|
||||
yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
|
||||
@@ -142,7 +142,7 @@ Install_mysql()
|
||||
echo $WHERE_DIR_GPP
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ] && [ "$VERSION_ID" == "18.04" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ] && [ "$VERSION_ID" = "18.04" ];then
|
||||
apt install -y libudev-dev
|
||||
apt install -y libtirpc-dev
|
||||
apt install -y libssl-dev
|
||||
|
||||
@@ -130,7 +130,7 @@ Install_mysql()
|
||||
|
||||
WHERE_DIR_GCC=/usr/bin/gcc
|
||||
WHERE_DIR_GPP=/usr/bin/g++
|
||||
if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then
|
||||
if [ "$OSNAME" = "centos" ] && [ "$VERSION_ID" = "7" ];then
|
||||
yum install -y libudev-devel
|
||||
yum install -y centos-release-scl
|
||||
yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
|
||||
@@ -142,7 +142,7 @@ Install_mysql()
|
||||
echo $WHERE_DIR_GPP
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
apt install -y libudev-dev
|
||||
apt install -y libtirpc-dev
|
||||
apt install -y libssl-dev
|
||||
@@ -164,7 +164,7 @@ Install_mysql()
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" == "opensuse" ];then
|
||||
if [ "$OSNAME" = "opensuse" ];then
|
||||
zypper install -y gcc11
|
||||
zypper install -y gcc11-c++
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ Install_mysql()
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" == "opensuse" ];then
|
||||
if [ "$OSNAME" = "opensuse" ];then
|
||||
zypper install -y gcc11
|
||||
zypper install -y gcc11-c++
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ Install_mysql()
|
||||
echo $WHERE_DIR_GPP
|
||||
fi
|
||||
|
||||
if [ "$OSNAME" == "ubuntu" ];then
|
||||
if [ "$OSNAME" = "ubuntu" ];then
|
||||
apt install -y libudev-dev
|
||||
apt install -y libtirpc-dev
|
||||
apt install -y libssl-dev
|
||||
|
||||
@@ -170,7 +170,7 @@ Install_mysql()
|
||||
fi
|
||||
|
||||
|
||||
if [ "$OSNAME" == "opensuse" ];then
|
||||
if [ "$OSNAME" = "opensuse" ];then
|
||||
zypper install -y gcc11
|
||||
zypper install -y gcc11-c++
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -70,7 +70,7 @@ Uninstall_App()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -37,7 +37,7 @@ Uninstall_App(){
|
||||
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_App
|
||||
else
|
||||
Uninstall_App
|
||||
|
||||
@@ -20,7 +20,7 @@ if [ -f ${rootPath}/bin/activate ];then
|
||||
. ${rootPath}/bin/activate
|
||||
fi
|
||||
|
||||
if [ "$sys_os" == "Darwin" ];then
|
||||
if [ "$sys_os" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
|
||||
@@ -5,7 +5,7 @@ export PATH=$PATH:/opt/stap/bin:/opt/stapxx
|
||||
# cd /www/server/mdserver-web/plugins/op_waf/t && bash ngx_debug.sh c ok
|
||||
|
||||
|
||||
if [ ${_os} == "Darwin" ]; then
|
||||
if [ ${_os} = "Darwin" ]; then
|
||||
OSNAME='macos'
|
||||
elif grep -Eq "openSUSE" /etc/*-release; then
|
||||
OSNAME='opensuse'
|
||||
@@ -124,12 +124,12 @@ for pid in ${pids[@]}; do
|
||||
echo "${name}_${pid}.svg -- make ok"
|
||||
done
|
||||
|
||||
# if [ $1 == "lua" ]; then
|
||||
# if [ $1 = "lua" ]; then
|
||||
# # /opt/openresty-systemtap-toolkit/ngx-sample-lua-bt -p 377452 --luajit20 -t 30 >temp.bt
|
||||
# /opt/openresty-systemtap-toolkit/ngx-sample-lua-bt -p $pid --luajit20 -t 30 >temp.bt
|
||||
# # /opt/openresty-systemtap-toolkit/fix-lua-bt temp.bt >t1.bt
|
||||
# /opt/openresty-systemtap-toolkit/fix-lua-bt temp.bt >${name}.bt
|
||||
# elif [ $1 == "c" ]; then
|
||||
# elif [ $1 = "c" ]; then
|
||||
# # /opt/openresty-systemtap-toolkit/sample-bt -p 496435 -t 10 -u > t2.bt
|
||||
# /opt/openresty-systemtap-toolkit/sample-bt -p $pid -t 10 -u > ${name}.bt
|
||||
# else
|
||||
|
||||
@@ -27,7 +27,7 @@ else
|
||||
fi
|
||||
|
||||
NGINX_IDS=`ps -ef|grep nginx | grep -v grep| awk '{print $2}'`
|
||||
if [ "$NGINX_IDS" == "" ];then
|
||||
if [ "$NGINX_IDS" = "" ];then
|
||||
ps -ef|grep nginx| grep -v grep| awk '{print $2}' | xargs kill -9
|
||||
systemctl start "$service_name"
|
||||
echo "OpenResty未运行,正在启动服务..."
|
||||
|
||||
@@ -20,7 +20,7 @@ openrestyDir=${serverPath}/source/openresty
|
||||
|
||||
Install_openresty()
|
||||
{
|
||||
if [ "${action}" == "install" ];then
|
||||
if [ "${action}" = "install" ];then
|
||||
if [ -d $serverPath/openresty ];then
|
||||
exit 0
|
||||
fi
|
||||
@@ -60,7 +60,7 @@ Install_openresty()
|
||||
fi
|
||||
|
||||
DOWNLOAD_SIZE=`wc -c ${openrestyDir}/openresty-${VERSION}.tar.gz | awk '{print $1}'`
|
||||
if [ "$DOWNLOAD_SIZE" == "0" ];then
|
||||
if [ "$DOWNLOAD_SIZE" = "0" ];then
|
||||
echo 'download failed, download again'
|
||||
rm -rf ${openrestyDir}/openresty-${VERSION}.tar.gz
|
||||
fi
|
||||
@@ -77,7 +77,7 @@ Install_openresty()
|
||||
opensslVersion="3.4.4"
|
||||
libresslVersion="3.9.1"
|
||||
pcreVersion='8.45'
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
|
||||
if [ ! -f ${openrestyDir}/pcre-${pcreVersion}.tar.gz ];then
|
||||
wget --no-check-certificate -O ${openrestyDir}/pcre-${pcreVersion}.tar.gz https://netix.dl.sourceforge.net/project/pcre/pcre/${pcreVersion}/pcre-${pcreVersion}.tar.gz
|
||||
@@ -160,7 +160,7 @@ Install_openresty()
|
||||
cd ${openrestyDir} && wget -O $openrestyDir/zstd-nginx-module.tar.gz https://github.com/tokers/zstd-nginx-module/archive/refs/heads/master.tar.gz
|
||||
cd ${openrestyDir} && tar -zxvf zstd-nginx-module.tar.gz
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
export ZSTD_INC=/opt/homebrew/include
|
||||
export ZSTD_LIB=/opt/homebrew/lib
|
||||
fi
|
||||
@@ -217,9 +217,9 @@ Uninstall_openresty()
|
||||
}
|
||||
|
||||
action=$1
|
||||
if [ "${1}" == "install" ];then
|
||||
if [ "${1}" = "install" ];then
|
||||
Install_openresty
|
||||
elif [ "${1}" == "upgrade" ];then
|
||||
elif [ "${1}" = "upgrade" ];then
|
||||
Install_openresty
|
||||
else
|
||||
Uninstall_openresty
|
||||
|
||||
@@ -180,7 +180,7 @@ Install_openresty()
|
||||
# 用于调式
|
||||
|
||||
CMD_MAKE=`which gmake`
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
gmake -j${cpuCore} && gmake install && gmake clean
|
||||
else
|
||||
make -j${cpuCore} && make install && make clean
|
||||
|
||||
@@ -16,7 +16,7 @@ SOURCE_ROOT=$rootPath/source/lib
|
||||
HTTP_PREFIX="https://"
|
||||
LOCAL_ADDR=common
|
||||
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
HTTP_PREFIX="https://mirror.ghproxy.com/"
|
||||
fi
|
||||
|
||||
@@ -27,7 +27,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
# 中国优化安装
|
||||
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
LOCAL_ADDR=common
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
fi
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
|
||||
@@ -20,7 +20,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -47,7 +47,7 @@ Install_lib()
|
||||
cd $php_lib/${_LIBNAME}-${LIBV}
|
||||
|
||||
OPTIONS=''
|
||||
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
@@ -98,8 +98,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -66,12 +66,12 @@ fi
|
||||
# OPTIONS="${OPTIONS} --with-jpeg --with-jpeg-dir=/usr/lib"
|
||||
OPTIONS='--without-iconv'
|
||||
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
if [ $sysName = 'Darwin' ]; then
|
||||
OPTIONS="${OPTIONS} --with-freetype-dir=${serverPath}/lib/freetype"
|
||||
fi
|
||||
|
||||
IS_64BIT=`getconf LONG_BIT`
|
||||
if [ "$IS_64BIT" == "64" ];then
|
||||
if [ "$IS_64BIT" = "64" ];then
|
||||
OPTIONS="${OPTIONS} --with-libdir=lib64"
|
||||
fi
|
||||
|
||||
@@ -165,7 +165,7 @@ Uninstall_php()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_php
|
||||
else
|
||||
Uninstall_php
|
||||
|
||||
@@ -46,7 +46,7 @@ Install_lib()
|
||||
cd $php_lib/zendopcache-7.0.5
|
||||
|
||||
OPTIONS=''
|
||||
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
@@ -107,8 +107,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -29,7 +29,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
# 中国优化安装
|
||||
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
|
||||
LOCAL_ADDR=common
|
||||
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
|
||||
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
|
||||
LOCAL_ADDR=cn
|
||||
fi
|
||||
|
||||
@@ -96,11 +96,11 @@ else
|
||||
fi
|
||||
# ----- cpu end ------
|
||||
|
||||
if [ "${SYS_ARCH}" == "aarch64" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ];then
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
if [ "${SYS_ARCH}" == "arm64" ] && [ "$sysName" == "Darwin" ] ;then
|
||||
if [ "${SYS_ARCH}" = "arm64" ] && [ "$sysName" = "Darwin" ] ;then
|
||||
# 修复mac arm64架构下php安装
|
||||
# 修复不能识别到sys_icache_invalidate
|
||||
cat ${curPath}/versions/${PHP_VER}/src/ext/pcre/sljitConfigInternal.h > $sourcePath/php/php${PHP_VER}/ext/pcre/pcrelib/sljit/sljitConfigInternal.h
|
||||
@@ -173,7 +173,7 @@ Uninstall_php()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_php
|
||||
else
|
||||
Uninstall_php
|
||||
|
||||
@@ -14,7 +14,7 @@ sourcePath=${serverPath}/source/php
|
||||
LIBNAME=ZendGuardLoader
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -89,8 +89,8 @@ Uninstall_lib()
|
||||
|
||||
actionType=$1
|
||||
version=$2
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -99,14 +99,14 @@ fi
|
||||
|
||||
|
||||
|
||||
if [ "${SYS_ARCH}" == "aarch64" ];then
|
||||
if [ "${SYS_ARCH}" = "aarch64" ];then
|
||||
# 修复aarch64架构下安装
|
||||
# /www/server/mdserver-web/plugins/php/versions/56/src/zend_multiply.h > /www/server/source/php/php56/Zend/zend_multiply.h
|
||||
cat ${curPath}/versions/${PHP_VER}/src/zend_multiply.h > $sourcePath/php/php${PHP_VER}/Zend/zend_multiply.h
|
||||
fi
|
||||
|
||||
|
||||
if [ "${SYS_ARCH}" == "arm64" ] && [ "$sysName" == "Darwin" ] ;then
|
||||
if [ "${SYS_ARCH}" = "arm64" ] && [ "$sysName" = "Darwin" ] ;then
|
||||
# 修复mac arm64架构下php安装
|
||||
# 修复不能识别到sys_icache_invalidate
|
||||
cat ${curPath}/versions/${PHP_VER}/src/ext/pcre/sljitConfigInternal.h > $sourcePath/php/php${PHP_VER}/ext/pcre/pcrelib/sljit/sljitConfigInternal.h
|
||||
@@ -155,7 +155,7 @@ Uninstall_php()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_php
|
||||
else
|
||||
Uninstall_php
|
||||
|
||||
@@ -158,7 +158,7 @@ Uninstall_php()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_php
|
||||
else
|
||||
Uninstall_php
|
||||
|
||||
@@ -206,7 +206,7 @@ Uninstall_php()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_php
|
||||
else
|
||||
Uninstall_php
|
||||
|
||||
@@ -65,12 +65,12 @@ fi
|
||||
cd $sourcePath/php/php${PHP_VER}
|
||||
|
||||
OPTIONS='--without-iconv'
|
||||
# if [ $sysName == 'Darwin' ]; then
|
||||
# if [ $sysName = 'Darwin' ]; then
|
||||
# OPTIONS="${OPTIONS} --with-curl"
|
||||
# fi
|
||||
|
||||
argon_version=`pkg-config libargon2 --modversion`
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
OPTIONS="${OPTIONS} --with-password-argon2"
|
||||
fi
|
||||
|
||||
@@ -154,7 +154,7 @@ Uninstall_php()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_php
|
||||
else
|
||||
Uninstall_php
|
||||
|
||||
@@ -24,7 +24,7 @@ cd ${rootPath}/plugins/php/lib && /bin/bash zlib.sh
|
||||
|
||||
# redat ge 8
|
||||
which yum
|
||||
if [ "$?" == "0" ];then
|
||||
if [ "$?" = "0" ];then
|
||||
cd ${rootPath}/plugins/php/lib && /bin/bash oniguruma.sh
|
||||
fi
|
||||
|
||||
@@ -38,7 +38,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
|
||||
LOCAL_ADDR=cn
|
||||
fi
|
||||
|
||||
if [ "$LOCAL_ADDR" == "cn" ];then
|
||||
if [ "$LOCAL_ADDR" = "cn" ];then
|
||||
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
|
||||
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://mirrors.nju.edu.cn/php/php-${version}.tar.xz
|
||||
fi
|
||||
@@ -109,7 +109,7 @@ fi
|
||||
# OPTIONS="${OPTIONS} --enable-debug"
|
||||
# OPTIONS="${OPTIONS} --enable-dtrace"
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BREW_DIR=`which brew`
|
||||
BREW_DIR=${BREW_DIR/\/bin\/brew/}
|
||||
|
||||
@@ -166,7 +166,7 @@ Uninstall_php()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_php
|
||||
else
|
||||
Uninstall_php
|
||||
|
||||
@@ -168,7 +168,7 @@ Uninstall_php()
|
||||
}
|
||||
|
||||
action=${1}
|
||||
if [ "${1}" == 'install' ];then
|
||||
if [ "${1}" = 'install' ];then
|
||||
Install_php
|
||||
else
|
||||
Uninstall_php
|
||||
|
||||
@@ -21,7 +21,7 @@ ROOT_DIR=$(cd "$(dirname "$0")"; pwd)
|
||||
# cd $DIR && /bin/bash install.sh install $PHP_VER
|
||||
# for ii in $cmd_ext
|
||||
# do
|
||||
# if [ "install.sh" == "$ii" ];then
|
||||
# if [ "install.sh" = "$ii" ];then
|
||||
# echo '' > /tmp/t.log
|
||||
# else
|
||||
# cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
|
||||
@@ -19,7 +19,7 @@ ROOT_DIR=$(cd "$(dirname "$0")"; pwd)
|
||||
# cd $DIR && /bin/bash install.sh install $PHP_VER
|
||||
# for ii in $cmd_ext
|
||||
# do
|
||||
# if [ "install.sh" == "$ii" ];then
|
||||
# if [ "install.sh" = "$ii" ];then
|
||||
# echo '' > /tmp/t.log
|
||||
# else
|
||||
# cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER
|
||||
|
||||
@@ -22,7 +22,7 @@ FILE=${curPath}/${version}/${extName}.sh
|
||||
FILE_COMMON=${curPath}/common/${extName}.sh
|
||||
|
||||
|
||||
if [ "$action" == 'install' ];then
|
||||
if [ "$action" = 'install' ];then
|
||||
|
||||
if [ -f $FILE ];then
|
||||
cd ${curPath}/${version} && bash ${extName}.sh install ${version}
|
||||
@@ -34,7 +34,7 @@ if [ "$action" == 'install' ];then
|
||||
fi
|
||||
|
||||
|
||||
if [ "$action" == 'uninstall' ];then
|
||||
if [ "$action" = 'uninstall' ];then
|
||||
if [ -f $FILE ];then
|
||||
cd ${curPath}/${version} && bash ${extName}.sh uninstall ${version}
|
||||
elif [ -f $FILE_COMMON ];then
|
||||
|
||||
@@ -21,7 +21,7 @@ version=$2
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
|
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -93,8 +93,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -113,8 +113,8 @@ Uninstall_lib()
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -19,7 +19,7 @@ version=$2
|
||||
LIBNAME=exif
|
||||
LIBV=0
|
||||
|
||||
if [ "$version" == "53" ];then
|
||||
if [ "$version" = "53" ];then
|
||||
echo "i wont support it"
|
||||
exit
|
||||
fi
|
||||
@@ -34,7 +34,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | gr
|
||||
extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -116,8 +116,8 @@ Uninstall_lib()
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -17,7 +17,7 @@ version=$2
|
||||
LIBNAME=fileinfo
|
||||
LIBV=0
|
||||
|
||||
if [ "$version" == "53" ];then
|
||||
if [ "$version" = "53" ];then
|
||||
echo "i wont support it"
|
||||
exit
|
||||
fi
|
||||
@@ -31,7 +31,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | gr
|
||||
extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -135,8 +135,8 @@ Uninstall_lib()
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -30,7 +30,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | gr
|
||||
extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -109,8 +109,8 @@ Uninstall_lib()
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -148,8 +148,8 @@ Uninstall_lib()
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -48,7 +48,7 @@ Install_lib()
|
||||
if [ ! -f "$extFile" ];then
|
||||
|
||||
OPTIONS=''
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
if [ $sysName = 'Darwin' ]; then
|
||||
LIB_DEPEND_DIR=`brew info openssl | grep /usr/local/Cellar/openssl | cut -d \ -f 1 | awk 'END {print}'`
|
||||
OPTIONS="--with-openssl-dir=${LIB_DEPEND_DIR}"
|
||||
fi
|
||||
|
||||
@@ -50,7 +50,7 @@ Install_lib()
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini
|
||||
echo "[opcache]" >> $serverPath/php/$version/etc/php.ini
|
||||
|
||||
if [ "$version" == "85" ];then
|
||||
if [ "$version" = "85" ];then
|
||||
echo "Force enable opcache in PHP 8.5+"
|
||||
else
|
||||
echo "zend_extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini
|
||||
@@ -84,8 +84,8 @@ Uninstall_lib()
|
||||
}
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -27,7 +27,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | gr
|
||||
extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
|
||||
|
||||
sysName=`uname`
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
if [ "$sysName" = "Darwin" ];then
|
||||
BAK='_bak'
|
||||
else
|
||||
BAK=''
|
||||
@@ -103,8 +103,8 @@ Uninstall_lib()
|
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then
|
||||
if [ "$actionType" = 'install' ];then
|
||||
Install_lib
|
||||
elif [ "$actionType" == 'uninstall' ];then
|
||||
elif [ "$actionType" = 'uninstall' ];then
|
||||
Uninstall_lib
|
||||
fi
|
||||
@@ -63,7 +63,7 @@ Install_lib()
|
||||
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
|
||||
if [ $sysName == 'Darwin' ]; then
|
||||
if [ $sysName = 'Darwin' ]; then
|
||||
BREW_DIR=`which brew`
|
||||
BREW_DIR=${BREW_DIR/\/bin\/brew/}
|
||||
LIB_DEPEND_DIR=`brew info curl | grep ${BREW_DIR}/Cellar/curl | cut -d \ -f 1 | awk 'END {print}'`
|
||||
|
||||
Reference in New Issue
Block a user