This script will install the appropriate EPEL repository for your version of RHEL.
1
2
3
4
5
#!/bin/bash
MAJOR_VERSION=$(cat /etc/os-release | grep "VERSION_ID" | \
cut -f 2 -d "=" | cut -f 2 -d '"' | cut -f 1 -d '.')
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$MAJOR_VERSION.noarch.rpm
For AlmaLinux, use these commands.
1
2
dnf install epel-release
dnf config-manager --set-enabled crb