Update install.sh
This commit is contained in:
parent
4d5f90e0ec
commit
3ee88ddfb4
|
|
@ -10,6 +10,46 @@ sourcePath=${serverPath}/source
|
|||
sysName=`uname`
|
||||
SYS_ARCH=`arch`
|
||||
|
||||
echo "use system: ${sysName}"
|
||||
if [ ${sysName} == "Darwin" ]; then
|
||||
OSNAME='macos'
|
||||
elif grep -Eq "openSUSE" /etc/*-release; then
|
||||
OSNAME='opensuse'
|
||||
zypper refresh
|
||||
elif grep -Eq "FreeBSD" /etc/*-release; then
|
||||
OSNAME='freebsd'
|
||||
pkg install -y wget unzip
|
||||
elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then
|
||||
OSNAME='arch'
|
||||
echo y | pacman -Sy unzip
|
||||
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
|
||||
OSNAME='centos'
|
||||
yum install -y wget zip unzip
|
||||
elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
|
||||
OSNAME='fedora'
|
||||
yum install -y wget zip unzip
|
||||
elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then
|
||||
OSNAME='rocky'
|
||||
yum install -y wget zip unzip
|
||||
elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then
|
||||
OSNAME='alma'
|
||||
yum install -y wget zip unzip
|
||||
elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
|
||||
OSNAME='debian'
|
||||
apt update -y
|
||||
apt install -y devscripts
|
||||
apt install -y wget zip unzip
|
||||
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
|
||||
OSNAME='ubuntu'
|
||||
apt install -y wget zip unzip
|
||||
else
|
||||
OSNAME='unknow'
|
||||
fi
|
||||
|
||||
VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'`
|
||||
|
||||
|
||||
|
||||
version=7.2.31
|
||||
PHP_VER=72
|
||||
md5_file_ok=968adcb8d0c5652b6e191b025fc8ba41
|
||||
|
|
@ -95,10 +135,18 @@ fi
|
|||
# ----- cpu end ------
|
||||
|
||||
|
||||
if [ "${SYS_ARCH}" == "arm64" ];then
|
||||
# 修复arm64架构下安装
|
||||
RELOAD_CODE(){
|
||||
cat ${curPath}/versions/${PHP_VER}/src/reentrancy.c > $sourcePath/php/php${PHP_VER}/main/reentrancy.c
|
||||
echo "cat ${curPath}/versions/${PHP_VER}/src/reentrancy.c > $sourcePath/php/php${PHP_VER}/main/reentrancy.c"
|
||||
}
|
||||
|
||||
if [ "${SYS_ARCH}" == "arm64" ];then
|
||||
# 修复arm64架构下安装
|
||||
RELOAD_CODE
|
||||
fi
|
||||
|
||||
if [ "${OSNAME}" == "debian" ] && [ "${VERSION_ID}" == "13" ];then
|
||||
RELOAD_CODE
|
||||
fi
|
||||
|
||||
if [ "$sysName" == "Darwin" ];then
|
||||
|
|
|
|||
Loading…
Reference in New Issue