Skip to content

Instantly share code, notes, and snippets.

@jwatson3d
Created June 10, 2023 02:32
Show Gist options
  • Save jwatson3d/9ebdd62dfef0d759721a932b68e0e511 to your computer and use it in GitHub Desktop.
Save jwatson3d/9ebdd62dfef0d759721a932b68e0e511 to your computer and use it in GitHub Desktop.

Revisions

  1. jwatson3d created this gist Jun 10, 2023.
    24 changes: 24 additions & 0 deletions enableEPEL.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    # Verify distro
    cat /etc/os-release

    # Amazon Linux 2
    sudo amazon-linux-extras install epel -y

    # RHEL 8
    sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y

    # RHEL 7
    sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

    # CentOS 8
    sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
    sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
    sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
    sudo dnf config-manager --set-enabled PowerTools

    # CentOS 7
    sudo yum -y install epel-release


    # List repositories turned on
    sudo yum repolist