pull/121/head
midoks 3 years ago
parent 6eb31d0b30
commit 18099f39ce
  1. 13
      plugins/php-apt/install.sh
  2. 17
      plugins/php-apt/versions/74/install.sh
  3. 17
      plugins/php-apt/versions/80/install.sh
  4. 17
      plugins/php-apt/versions/81/install.sh
  5. 13
      plugins/php-apt/versions/82/install.sh

@ -32,6 +32,19 @@ if [ ! -d $curPath/versions/$2 ];then
fi
if [ ! -f /etc/apt/sources.list.d/php.list ];then
# install php source
apt update -y
apt -y install apt-transport-https lsb-release ca-certificates curl
curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
apt update -y
fi
if [ "${action}" == "uninstall" ] && [ -d ${serverPath}/php-apt/${type} ];then
#初始化
cd ${rootPath} && python3 ${rootPath}/plugins/php-apt/index.py stop ${type}

@ -24,14 +24,9 @@ PHP_VER=74
Install_php()
{
#------------------------ install start ------------------------------------#
### centos start ################
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm
yum install -y php74 php74-php-fpm
### centos start ################
apt -y install php7.4 php7.4-fpm
if [ "$?" == "0" ];then
mkdir -p $serverPath/php-yum/${PHP_VER}
mkdir -p $serverPath/php-apt/${PHP_VER}
fi
#------------------------ install end ------------------------------------#
@ -39,9 +34,11 @@ fi
Uninstall_php()
{
# $serverPath/php-ya/init.d/php${PHP_VER} stop
rm -rf $serverPath/php-yum/${PHP_VER}
echo "卸载php-${version}..." > $install_tmp
#------------------------ uninstall start ------------------------------------#
apt -y remove php7.4 ph7.4-fpm
rm -rf $serverPath/php-apt/${PHP_VER}
echo "卸载php-${version}..." > $install_tmp
#------------------------ uninstall start ------------------------------------#
}
action=${1}

@ -24,14 +24,9 @@ PHP_VER=80
Install_php()
{
#------------------------ install start ------------------------------------#
### centos start ################
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm
yum install -y php80 php80-php-fpm
### centos start ################
apt -y install php8.0 php8.0-fpm
if [ "$?" == "0" ];then
mkdir -p $serverPath/php-yum/${PHP_VER}
mkdir -p $serverPath/php-apt/${PHP_VER}
fi
#------------------------ install end ------------------------------------#
@ -39,9 +34,11 @@ fi
Uninstall_php()
{
# $serverPath/php-ya/init.d/php${PHP_VER} stop
rm -rf $serverPath/php-yum/${PHP_VER}
echo "卸载php-${version}..." > $install_tmp
#------------------------ uninstall start ------------------------------------#
apt -y remove php8.0 php8.0-fpm
rm -rf $serverPath/php-apt/${PHP_VER}
echo "卸载php-${version}..." > $install_tmp
#------------------------ uninstall start ------------------------------------#
}
action=${1}

@ -24,14 +24,9 @@ PHP_VER=81
Install_php()
{
#------------------------ install start ------------------------------------#
### centos start ################
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm
yum install -y php81 php81-php-fpm
### centos start ################
apt -y install php8.1 php8.1-fpm
if [ "$?" == "0" ];then
mkdir -p $serverPath/php-yum/${PHP_VER}
mkdir -p $serverPath/php-apt/${PHP_VER}
fi
#------------------------ install end ------------------------------------#
@ -39,9 +34,11 @@ fi
Uninstall_php()
{
# $serverPath/php-ya/init.d/php${PHP_VER} stop
rm -rf $serverPath/php-yum/${PHP_VER}
echo "卸载php-${version}..." > $install_tmp
#------------------------ uninstall start ------------------------------------#
apt -y remove php8.1 php8.1-fpm
rm -rf $serverPath/php-apt/${PHP_VER}
echo "卸载php-${version}..." > $install_tmp
#------------------------ uninstall start ------------------------------------#
}
action=${1}

@ -25,10 +25,7 @@ Install_php()
{
#------------------------ install start ------------------------------------#
### centos start ################
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm
yum install -y php82 php82-php-fpm
### centos start ################
apt -y install php8.2 php8.2-fpm
if [ "$?" == "0" ];then
mkdir -p $serverPath/php-apt/${PHP_VER}
@ -39,9 +36,11 @@ fi
Uninstall_php()
{
# $serverPath/php-ya/init.d/php${PHP_VER} stop
rm -rf $serverPath/php-apt/${PHP_VER}
echo "卸载php-${version}..." > $install_tmp
#------------------------ uninstall start ------------------------------------#
apt -y remove php8.2 php8.2-fpm
rm -rf $serverPath/php-apt/${PHP_VER}
echo "卸载php-${version}..." > $install_tmp
#------------------------ uninstall start ------------------------------------#
}
action=${1}

Loading…
Cancel
Save