diff --git a/plugins/php-yum/install.sh b/plugins/php-yum/install.sh index 0412dffc1..4e3aa257f 100755 --- a/plugins/php-yum/install.sh +++ b/plugins/php-yum/install.sh @@ -32,6 +32,25 @@ if [ ! -d $curPath/versions/$2 ];then fi + +#获取信息和版本 +# bash /www/server/mdsever-web/scripts/getos.sh +bash ${rootPath}/scripts/getos.sh +OSNAME=`cat ${rootPath}/data/osname.pl` +VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` + + +if [ "$OSNAME" == "centos" ];then + rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-${VERSION_ID}.rpm +fi + + +if [ "$OSNAME" == "fedora" ];then + rpm -Uvh http://rpms.remirepo.net/fedora/remi-release-${VERSION_ID}.rpm +fi + + + if [ "${action}" == "uninstall" ] && [ -d ${serverPath}/php-yum/${type} ];then #初始化 cd ${rootPath} && python3 ${rootPath}/plugins/php-yum/index.py stop ${type} diff --git a/plugins/php-yum/versions/74/install.sh b/plugins/php-yum/versions/74/install.sh index ef8f50566..0bca5bd88 100755 --- a/plugins/php-yum/versions/74/install.sh +++ b/plugins/php-yum/versions/74/install.sh @@ -25,11 +25,7 @@ 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 ################ - +yum install -y php74 php74-php-fpm if [ "$?" == "0" ];then mkdir -p $serverPath/php-yum/${PHP_VER} fi diff --git a/plugins/php-yum/versions/80/install.sh b/plugins/php-yum/versions/80/install.sh index 99361224b..da3c3d5c3 100755 --- a/plugins/php-yum/versions/80/install.sh +++ b/plugins/php-yum/versions/80/install.sh @@ -25,11 +25,8 @@ 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 ################ +yum install -y php80 php80-php-fpm if [ "$?" == "0" ];then mkdir -p $serverPath/php-yum/${PHP_VER} fi diff --git a/plugins/php-yum/versions/81/install.sh b/plugins/php-yum/versions/81/install.sh index f60ec2b71..c8793a83b 100755 --- a/plugins/php-yum/versions/81/install.sh +++ b/plugins/php-yum/versions/81/install.sh @@ -24,12 +24,7 @@ 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 ################ - +yum install -y php81 php81-php-fpm if [ "$?" == "0" ];then mkdir -p $serverPath/php-yum/${PHP_VER} fi diff --git a/plugins/php-yum/versions/82/install.sh b/plugins/php-yum/versions/82/install.sh index 100542c2b..514b3db7e 100755 --- a/plugins/php-yum/versions/82/install.sh +++ b/plugins/php-yum/versions/82/install.sh @@ -11,12 +11,6 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl -#获取信息和版本 -# bash /www/server/mdsever-web/scripts/getos.sh -bash ${rootPath}/scripts/getos.sh -OSNAME=`cat ${rootPath}/data/osname.pl` -VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` - version=8.2.x PHP_VER=82 @@ -24,12 +18,7 @@ PHP_VER=82 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 ################ - if [ "$?" == "0" ];then mkdir -p $serverPath/php-yum/${PHP_VER} fi