This commit is contained in:
dami
2026-09-11 21:10:03 +08:00
parent aa317ee2f5
commit 370ff99134
18 changed files with 65 additions and 64 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ Install_App()
cd ${apacheDir} && tar -jxf apr-util-${APR_UTIL_VERSION}.tar.bz2 cd ${apacheDir} && tar -jxf apr-util-${APR_UTIL_VERSION}.tar.bz2
cd ${apacheDir}/apr-util-${APR_UTIL_VERSION} && ./configure --prefix=${serverPath}/apache/apr-util --with-apr=${serverPath}/apache/apr cd ${apacheDir}/apr-util-${APR_UTIL_VERSION} && ./configure --prefix=${serverPath}/apache/apr-util --with-apr=${serverPath}/apache/apr
make -j${cpuCore} && make install make -j${cpuCore} && make install
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
# 检查 APR-util 配置文件 # 检查 APR-util 配置文件
APU_CONFIG=$(find ${serverPath}/apache/apr-util -name "apu-*config" | head -1) APU_CONFIG=$(find ${serverPath}/apache/apr-util -name "apu-*config" | head -1)
if [ -z "$APU_CONFIG" ];then if [ -z "$APU_CONFIG" ];then
+1 -1
View File
@@ -40,7 +40,7 @@ fi
Install_Docker() Install_Docker()
{ {
# which docker # which docker
# if [ "$?" == "0" ];then # if [ "$?" = "0" ];then
# echo '安装已经完成docker' # echo '安装已经完成docker'
# exit 0 # exit 0
# fi # fi
+2 -2
View File
@@ -43,7 +43,7 @@ Install_App()
echo '正在安装脚本文件...' echo '正在安装脚本文件...'
version=$1 version=$1
if [ "macos" == "$OSNAME" ];then if [ "macos" = "$OSNAME" ];then
echo "not support!" echo "not support!"
exit exit
else else
@@ -95,7 +95,7 @@ Uninstall_App()
action=$1 action=$1
version=$2 version=$2
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_App $version Install_App $version
else else
Uninstall_App $version Uninstall_App $version
+3 -2
View File
@@ -66,8 +66,9 @@ def getArgs():
if t.strip() == '': if t.strip() == '':
tmp = [] tmp = []
else: else:
t = t.split(':',1) arg_t = t.split(',')
tmp[t[0]] = t[1] for i in range(len(arg_t)):
t = arg_t[i].split(':',1)
tmp[t[0]] = t[1] tmp[t[0]] = t[1]
elif args_len > 1: elif args_len > 1:
for i in range(len(args)): for i in range(len(args)):
+2 -2
View File
@@ -26,7 +26,7 @@ if [ ! -f $OP_BL ];then
touch $OP_BL touch $OP_BL
fi fi
if [ "$actionType" == 'install' ];then if [ "$actionType" = 'install' ];then
apt install -y php${version}-${LIBNAME} apt install -y php${version}-${LIBNAME}
echo "ls ${ext_dir} | grep "${LIBNAME}.ini"| cut -d \ -f 1" echo "ls ${ext_dir} | grep "${LIBNAME}.ini"| cut -d \ -f 1"
@@ -54,7 +54,7 @@ if [ "$actionType" == 'install' ];then
echo "opcache.save_comments=0" >> $ext_file echo "opcache.save_comments=0" >> $ext_file
echo "opcache.blacklist_filename=${OP_BL}" >> $ext_file echo "opcache.blacklist_filename=${OP_BL}" >> $ext_file
elif [ "$actionType" == 'uninstall' ];then elif [ "$actionType" = 'uninstall' ];then
rm -rf $ext_file rm -rf $ext_file
echo 'cannot uninstall' echo 'cannot uninstall'
fi fi
+13 -13
View File
@@ -24,33 +24,33 @@ LIBV=0
# fi # fi
CMD='apt ' CMD='apt '
if [ "$actionType" == 'install' ];then if [ "$actionType" = 'install' ];then
CMD="$CMD install -y php${version}-" CMD="$CMD install -y php${version}-"
elif [ "$actionType" == 'uninstall' ];then elif [ "$actionType" = 'uninstall' ];then
CMD="$CMD uninstall -y php${version}-" CMD="$CMD uninstall -y php${version}-"
fi fi
if [ "$version" == '5.6' ];then if [ "$version" = '5.6' ];then
CMD="${CMD}phalcon3" CMD="${CMD}phalcon3"
elif [[ "$version" == '7.0' ]]; then elif [[ "$version" = '7.0' ]]; then
CMD="${CMD}phalcon3" CMD="${CMD}phalcon3"
elif [[ "$version" == '7.1' ]]; then elif [[ "$version" = '7.1' ]]; then
CMD="${CMD}phalcon3" CMD="${CMD}phalcon3"
elif [[ "$version" == '7.2' ]]; then elif [[ "$version" = '7.2' ]]; then
CMD="${CMD}phalcon4" CMD="${CMD}phalcon4"
elif [[ "$version" == '7.3' ]]; then elif [[ "$version" = '7.3' ]]; then
CMD="${CMD}phalcon3" CMD="${CMD}phalcon3"
elif [[ "$version" == '7.4' ]]; then elif [[ "$version" = '7.4' ]]; then
CMD="${CMD}phalcon4" CMD="${CMD}phalcon4"
elif [[ "$version" == '8.0' ]]; then elif [[ "$version" = '8.0' ]]; then
CMD="${CMD}phalcon5" CMD="${CMD}phalcon5"
elif [[ "$version" == '8.1' ]]; then elif [[ "$version" = '8.1' ]]; then
CMD="${CMD}phalcon5" CMD="${CMD}phalcon5"
elif [[ "$version" == '8.2' ]]; then elif [[ "$version" = '8.2' ]]; then
CMD="${CMD}phalcon5" CMD="${CMD}phalcon5"
elif [[ "$version" == '8.3' ]]; then elif [[ "$version" = '8.3' ]]; then
CMD="${CMD}phalcon5" CMD="${CMD}phalcon5"
elif [[ "$version" == '8.4' ]]; then elif [[ "$version" = '8.4' ]]; then
CMD="${CMD}phalcon5" CMD="${CMD}phalcon5"
fi fi
+4 -4
View File
@@ -24,7 +24,7 @@ SG_VER=${version}
extVer=`bash $curPath/lib.sh $version` extVer=`bash $curPath/lib.sh $version`
extFile=/usr/lib/php/${extVer}/${LIBNAME}.so extFile=/usr/lib/php/${extVer}/${LIBNAME}.so
if [ "$sysName" == "Darwin" ];then if [ "$sysName" = "Darwin" ];then
BAK='_bak' BAK='_bak'
else else
BAK='' BAK=''
@@ -41,7 +41,7 @@ Install_lib()
DEFAULT_OSNAME=linux-x86_64 DEFAULT_OSNAME=linux-x86_64
SUFFIX_NAME=lin SUFFIX_NAME=lin
if [ "$OSNAME" == 'macos' ];then if [ "$OSNAME" = 'macos' ];then
DEFAULT_OSNAME=macosx DEFAULT_OSNAME=macosx
SUFFIX_NAME=dar SUFFIX_NAME=dar
fi fi
@@ -116,8 +116,8 @@ Uninstall_lib()
} }
if [ "$actionType" == 'install' ];then if [ "$actionType" = 'install' ];then
Install_lib Install_lib
elif [ "$actionType" == 'uninstall' ];then elif [ "$actionType" = 'uninstall' ];then
Uninstall_lib Uninstall_lib
fi fi
+3 -3
View File
@@ -26,7 +26,7 @@ extFile=/usr/lib/php/${extVer}/${LIBNAME}.so
if [ "$sysName" == "Darwin" ];then if [ "$sysName" = "Darwin" ];then
BAK='_bak' BAK='_bak'
else else
BAK='' BAK=''
@@ -94,8 +94,8 @@ Uninstall_lib()
} }
if [ "$actionType" == 'install' ];then if [ "$actionType" = 'install' ];then
Install_lib Install_lib
elif [ "$actionType" == 'uninstall' ];then elif [ "$actionType" = 'uninstall' ];then
Uninstall_lib Uninstall_lib
fi fi
+3 -3
View File
@@ -30,7 +30,7 @@ extFile=/usr/lib/php/${extVer}/${LIBNAME}.so
if [ "$sysName" == "Darwin" ];then if [ "$sysName" = "Darwin" ];then
BAK='_bak' BAK='_bak'
else else
BAK='' BAK=''
@@ -98,8 +98,8 @@ Uninstall_lib()
} }
if [ "$actionType" == 'install' ];then if [ "$actionType" = 'install' ];then
Install_lib Install_lib
elif [ "$actionType" == 'uninstall' ];then elif [ "$actionType" = 'uninstall' ];then
Uninstall_lib Uninstall_lib
fi fi
+1 -1
View File
@@ -27,7 +27,7 @@ Uninstall_pg()
action=$1 action=$1
host=$2 host=$2
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_pg Install_pg
else else
Uninstall_pg Uninstall_pg
+6 -6
View File
@@ -19,7 +19,7 @@ fi
action=$1 action=$1
type=$2 type=$2
if [ "${2}" == "" ];then if [ "${2}" = "" ];then
echo '缺少安装脚本...' echo '缺少安装脚本...'
exit 0 exit 0
fi fi
@@ -37,21 +37,21 @@ bash ${rootPath}/scripts/getos.sh
OSNAME=`cat ${rootPath}/data/osname.pl` OSNAME=`cat ${rootPath}/data/osname.pl`
VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
if [ "$OSNAME" == "alma" ];then if [ "$OSNAME" = "alma" ];then
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm
fi fi
if [ "$OSNAME" == "rocky" ];then if [ "$OSNAME" = "rocky" ];then
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm
fi fi
if [ "$OSNAME" == "centos" ];then if [ "$OSNAME" = "centos" ];then
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm
fi fi
# rpm -Uvh http://rpms.remirepo.net/fedora/remi-release-31.rpm # rpm -Uvh http://rpms.remirepo.net/fedora/remi-release-31.rpm
if [ "$OSNAME" == "fedora" ];then if [ "$OSNAME" = "fedora" ];then
rpm -Uvh http://rpms.remirepo.net/fedora/remi-release-${VERSION_ID}.rpm rpm -Uvh http://rpms.remirepo.net/fedora/remi-release-${VERSION_ID}.rpm
fi fi
@@ -75,7 +75,7 @@ fi
cd ${curPath} && sh -x $curPath/versions/$2/install.sh $1 cd ${curPath} && sh -x $curPath/versions/$2/install.sh $1
if [ "${action}" == "install" ] && [ -d ${serverPath}/php-yum/${type} ];then if [ "${action}" = "install" ] && [ -d ${serverPath}/php-yum/${type} ];then
# 安装通用扩展 # 安装通用扩展
echo "install PHP-YUM[${type}] extend start" echo "install PHP-YUM[${type}] extend start"
+2 -2
View File
@@ -18,7 +18,7 @@ Install_php()
#------------------------ install start ------------------------------------# #------------------------ install start ------------------------------------#
yum install -y php74 php74-php-fpm yum install -y php74 php74-php-fpm
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
mkdir -p $serverPath/php-yum/${PHP_VER} mkdir -p $serverPath/php-yum/${PHP_VER}
fi fi
@@ -33,7 +33,7 @@ Uninstall_php()
} }
action=${1} action=${1}
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_php Install_php
else else
Uninstall_php Uninstall_php
+2 -2
View File
@@ -17,7 +17,7 @@ Install_php()
{ {
#------------------------ install start ------------------------------------# #------------------------ install start ------------------------------------#
yum install -y php81 php81-php-fpm yum install -y php81 php81-php-fpm
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
mkdir -p $serverPath/php-yum/${PHP_VER} mkdir -p $serverPath/php-yum/${PHP_VER}
fi fi
@@ -32,7 +32,7 @@ Uninstall_php()
} }
action=${1} action=${1}
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_php Install_php
else else
Uninstall_php Uninstall_php
+2 -2
View File
@@ -17,7 +17,7 @@ Install_php()
{ {
#------------------------ install start ------------------------------------# #------------------------ install start ------------------------------------#
yum install -y php82 php82-php-fpm yum install -y php82 php82-php-fpm
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
mkdir -p $serverPath/php-yum/${PHP_VER} mkdir -p $serverPath/php-yum/${PHP_VER}
fi fi
@@ -32,7 +32,7 @@ Uninstall_php()
} }
action=${1} action=${1}
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_php Install_php
else else
Uninstall_php Uninstall_php
+2 -2
View File
@@ -17,7 +17,7 @@ Install_php()
{ {
#------------------------ install start ------------------------------------# #------------------------ install start ------------------------------------#
yum install -y php85 php85-php-fpm yum install -y php85 php85-php-fpm
if [ "$?" == "0" ];then if [ "$?" = "0" ];then
mkdir -p $serverPath/php-yum/${PHP_VER} mkdir -p $serverPath/php-yum/${PHP_VER}
fi fi
@@ -32,7 +32,7 @@ Uninstall_php()
} }
action=${1} action=${1}
if [ "${1}" == 'install' ];then if [ "${1}" = 'install' ];then
Install_php Install_php
else else
Uninstall_php Uninstall_php
+3 -3
View File
@@ -24,7 +24,7 @@ FILE_COMMON=${curPath}/common/${extName}.sh
# yum install -y php74-php-pecl-mysql # yum install -y php74-php-pecl-mysql
if [ "$action" == 'install' ];then if [ "$action" = 'install' ];then
if [ -f $FILE ];then if [ -f $FILE ];then
bash ${curPath}/${version}/${extName}.sh install bash ${curPath}/${version}/${extName}.sh install
@@ -41,7 +41,7 @@ if [ "$action" == 'install' ];then
fi fi
# yum remove -y php81-php-yar # yum remove -y php81-php-yar
if [ "$action" == 'uninstall' ];then if [ "$action" = 'uninstall' ];then
if [ -f $FILE ];then if [ -f $FILE ];then
bash ${curPath}/${version}/${extName}.sh uninstall bash ${curPath}/${version}/${extName}.sh uninstall
@@ -63,7 +63,7 @@ echo "yum remove -y php${version}-php-pecl-${extName}"
echo "systemctl restart php${version}-php-fpm" echo "systemctl restart php${version}-php-fpm"
php_status=`systemctl status php${version}-php-fpm | grep inactive` php_status=`systemctl status php${version}-php-fpm | grep inactive`
echo "php_status:${php_status}" echo "php_status:${php_status}"
if [ "$php_status" == "" ];then if [ "$php_status" = "" ];then
systemctl restart php${version}-php-fpm systemctl restart php${version}-php-fpm
fi fi
+2 -2
View File
@@ -87,8 +87,8 @@ Uninstall_lib()
} }
if [ "$actionType" == 'install' ];then if [ "$actionType" = 'install' ];then
Install_lib Install_lib
elif [ "$actionType" == 'uninstall' ];then elif [ "$actionType" = 'uninstall' ];then
Uninstall_lib Uninstall_lib
fi fi
+12 -12
View File
@@ -34,28 +34,28 @@ serverPath=$(dirname "$rootPath")
version=$1 version=$1
if [ "$version" == '5.6' ];then if [ "$version" = '5.6' ];then
echo '20131226' echo '20131226'
elif [[ "$version" == '7.0' ]]; then elif [[ "$version" = '7.0' ]]; then
echo '20151012' echo '20151012'
elif [[ "$version" == '7.1' ]]; then elif [[ "$version" = '7.1' ]]; then
echo '20160303' echo '20160303'
elif [[ "$version" == '7.2' ]]; then elif [[ "$version" = '7.2' ]]; then
echo '20170718' echo '20170718'
elif [[ "$version" == '7.3' ]]; then elif [[ "$version" = '7.3' ]]; then
echo '20180731' echo '20180731'
elif [[ "$version" == '7.4' ]]; then elif [[ "$version" = '7.4' ]]; then
echo '20190902' echo '20190902'
elif [[ "$version" == '8.0' ]]; then elif [[ "$version" = '8.0' ]]; then
echo '20200930' echo '20200930'
elif [[ "$version" == '8.1' ]]; then elif [[ "$version" = '8.1' ]]; then
echo '20210902' echo '20210902'
elif [[ "$version" == '8.2' ]]; then elif [[ "$version" = '8.2' ]]; then
echo '20220829' echo '20220829'
elif [[ "$version" == '8.3' ]]; then elif [[ "$version" = '8.3' ]]; then
echo '20230831' echo '20230831'
elif [[ "$version" == '8.4' ]]; then elif [[ "$version" = '8.4' ]]; then
echo '20240924' echo '20240924'
elif [[ "$version" == '8.5' ]]; then elif [[ "$version" = '8.5' ]]; then
echo '20250925' echo '20250925'
fi fi