diff --git a/scripts/install/rhel.sh b/scripts/install/rhel.sh index 7b69422ef..6474a288a 100644 --- a/scripts/install/rhel.sh +++ b/scripts/install/rhel.sh @@ -13,6 +13,13 @@ setenforce 0 sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config VERSION_ID=`grep -o -i 'release *[[:digit:]]\+\.*' /etc/redhat-release | grep -o '[[:digit:]]\+' ` + +if [ $VERSION_ID == '7' ]; then + yum install -y curl-devel libmcrypt libmcrypt-devel python3-devel +elif [ $VERSION_ID == '8' ]; then + dnf install -y curl-devel libmcrypt libmcrypt-devel python36-devel +fi + isStream=$(grep -o -i 'stream' /etc/redhat-release) cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"") diff --git a/scripts/update/rhel.sh b/scripts/update/rhel.sh index 20c2f28a6..514c2c497 100644 --- a/scripts/update/rhel.sh +++ b/scripts/update/rhel.sh @@ -5,13 +5,7 @@ export LANG=en_US.UTF-8 sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config -VERSION_ID=`grep -o -i 'release *[[:digit:]]\+\.*' /etc/redhat-release | grep -o '[[:digit:]]\+' ` -if [ $VERSION_ID == '7' ]; then - yum install -y curl-devel libmcrypt libmcrypt-devel python3-devel -elif [ $VERSION_ID == '8' ]; then - dnf install -y curl-devel libmcrypt libmcrypt-devel python36-devel -fi cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data