-->

DEVOPSZONES

  • Recent blogs

    How can I make my Amazon EC2 instance running CentOS, RHEL, or Amazon Linux use the EPEL repository?

    How can I make my Amazon EC2 instance running CentOS, RHEL, or Amazon Linux use the EPEL repository?

    Why We Need EPEL?

     

    The packages that can be installed on CentOS, RHEL, or Amazon Linux-based distributions might not all be available in standard repositories. Using the EPEL repository gives you more choices for installing packages.

    Resolution

    To download, set up, and enable the EPEL repository on RHEL, CentOS, or Amazon Linux-based distributions, follow these instructions.


    Run this command to confirm the distribution:

    cat /etc/os-release

    Amazon Linux

    Amazon Linux 2:

    Install the EPEL release package for RHEL 7 and enable the EPEL repository:

    #amazon-linux-extras install epel -y

    RHEL

    RHEL 8:

    Install the RHEL 8 EPEL release package. Activate the CodeReady Builder and EPEL repositories. Many EPEL packages rely on the development tools in the CodeReady Builder repository:

    # dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
    # /usr/bin/crb enable

    RHEL 7:

    Install and enable the EPEL release package for RHEL 7:

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

    CentOS

    CentOS 8:

    Install the EPEL release package for RHEL 8. Enable both the EPEL and PowerTools repositories. The PowerTools repository contains development tools required by many EPEL packages:

    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:

    Install and enable the EPEL release package. CentOS 7 includes the epel-release package in the base repositories:

    # yum -y install epel-release

    List enabled repositories

    To verify that the EPEL repository is enabled, run the repolist command:

    # yum repolist

    No comments