install.sh

This commit is contained in:
qiaofeng1227 2023-11-10 09:23:53 +08:00
parent 0c1fc84d94
commit 1bb1f20bbf

View file

@ -143,11 +143,20 @@ install_tools(){
if [ "$ID" = "rhel" ] || [ "$ID" = "ol" ]; then if [ "$ID" = "rhel" ] || [ "$ID" = "ol" ]; then
RHEL_VERSION=${VERSION_ID%%.*} RHEL_VERSION=${VERSION_ID%%.*}
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${RHEL_VERSION}.noarch.rpm sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${RHEL_VERSION}.noarch.rpm >/dev/null
if [ $? -ne 0 ]; then
exit 1
fi
elif [ "$ID" = "centos" ] || [ "$ID" = "rocky" ]; then elif [ "$ID" = "centos" ] || [ "$ID" = "rocky" ]; then
sudo yum install -y "$repo_tools_yum" sudo yum install -y "$repo_tools_yum" >/dev/null
if [ $? -ne 0 ]; then
exit 1
fi
elif [ "$ID" = "amzn" ]; then elif [ "$ID" = "amzn" ]; then
sudo amazon-linux-extras install epel -y sudo amazon-linux-extras install epel -y >/dev/null
if [ $? -ne 0 ]; then
exit 1
fi
fi fi
dnf --version >/dev/null 2>&1 dnf --version >/dev/null 2>&1