php升级版本

This commit is contained in:
midoks
2023-10-18 22:54:59 +08:00
parent 5e91ac8fe9
commit 1937a6344e
4 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
"title": "PHP",
"coexist": true,
"versions": ["53","54","55","56","70","71","72","73","74","80","81","82","83"],
"updates": ["5.3.29","5.4.45","5.6.36","7.0.30","7.1.33","7.2.32","7.3.20","7.4.30","8.0.30","8.1.8","8.2.9","8.3.0"],
"updates": ["5.3.29","5.4.45","5.6.36","7.0.30","7.1.33","7.2.32","7.3.20","7.4.30","8.0.30","8.1.24","8.2.11","8.3.0"],
"tip": "soft",
"install_pre_inspection":true,
"checks": "server/php/VERSION/bin/php",
+6 -6
View File
@@ -51,19 +51,19 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
fi
# ----------------------------------------------------------------------- #
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://www.php.net/distributions/php-${version}.tar.xz
fi
#检测文件是否损坏.
md5_file_ok=453206c948d9504b91fcec30fcb59b75
md5_file_ok=216ab305737a5d392107112d618a755dc5df42058226f1670e9db90e77d777d9
if [ -f $sourcePath/php/php-${version}.tar.xz ];then
md5_file=`md5sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'`
md5_file=`sha256sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'`
if [ "${md5_file}" != "${md5_file_ok}" ]; then
echo "PHP${version} 下载文件不完整,重新安装"
rm -rf $sourcePath/php/php-${version}.tar.xz
fi
fi
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://www.php.net/distributions/php-${version}.tar.xz
fi
cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz
mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER}
+2 -2
View File
@@ -56,9 +56,9 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
fi
#检测文件是否损坏.
md5_file_ok=b3a403d00c28d5e33c0c5b7464d27671
md5_file_ok=ee61f6232bb29bd2e785daf325d2177f2272bf80d086c295a724594e710bce3d
if [ -f $sourcePath/php/php-${version}.tar.xz ];then
md5_file=`md5sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'`
md5_file=`sha256sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'`
if [ "${md5_file}" != "${md5_file_ok}" ]; then
echo "PHP${version} 下载文件不完整,重新安装"
rm -rf $sourcePath/php/php-${version}.tar.xz
+7 -7
View File
@@ -16,7 +16,7 @@ function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)"
function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; }
version=8.2.9
version=8.2.11
PHP_VER=82
Install_php()
{
@@ -52,19 +52,19 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
# ----------------------------------------------------------------------- #
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://www.php.net/distributions/php-${version}.tar.xz
fi
#检测文件是否损坏.
md5_file_ok=897c9c416663d03e516a68cb86b598f3
md5_file_ok=29af82e4f7509831490552918aad502697453f0869a579ee1b80b08f9112c5b8
if [ -f $sourcePath/php/php-${version}.tar.xz ];then
md5_file=`md5sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'`
md5_file=`sha256sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'`
if [ "${md5_file}" != "${md5_file_ok}" ]; then
echo "PHP${version} 下载文件不完整,重新安装"
rm -rf $sourcePath/php/php-${version}.tar.xz
fi
fi
if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then
wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://www.php.net/distributions/php-${version}.tar.xz
fi
cd $sourcePath/php && tar -Jxf $sourcePath/php/php-${version}.tar.xz
mv $sourcePath/php/php-${version} $sourcePath/php/php${PHP_VER}