From f95946a11b9f5ad8c3eef7db748fa7348476d8e1 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 10 Jun 2024 03:59:47 +0800 Subject: [PATCH] update --- scripts/install/rhel.sh | 7 +++++++ scripts/update/rhel.sh | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) 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