Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
mdserver-web/plugins/php-yum/versions/81/install.sh

39 lines
776 B

#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source
sysName=`uname`
version=8.1.x
PHP_VER=81
Install_php()
{
#------------------------ install start ------------------------------------#
yum install -y php81 php81-php-fpm
if [ "$?" == "0" ];then
mkdir -p $serverPath/php-yum/${PHP_VER}
fi
#------------------------ install end ------------------------------------#
}
Uninstall_php()
{
yum remove -y php81 php81-php-fpm php81-*
rm -rf $serverPath/php-yum/${PHP_VER}
echo "卸载php-${version}..."
}
action=${1}
if [ "${1}" == 'install' ];then
Install_php
else
Uninstall_php
fi