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/74/install.sh

41 lines
777 B

3 years ago
#!/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=7.4.x
3 years ago
PHP_VER=74
3 years ago
Install_php()
{
#------------------------ install start ------------------------------------#
3 years ago
yum install -y php74 php74-php-fpm
if [ "$?" == "0" ];then
mkdir -p $serverPath/php-yum/${PHP_VER}
3 years ago
fi
#------------------------ install end ------------------------------------#
}
Uninstall_php()
{
2 years ago
yum remove -y php74 php74-php-fpm php74-*
rm -rf $serverPath/php-yum/${PHP_VER}
6 months ago
echo "卸载php-${version}..."
3 years ago
}
action=${1}
if [ "${1}" == 'install' ];then
Install_php
else
Uninstall_php
fi