...

How To Install EPEL Repo on an RHEL 8.x nixCraft

how-to-install-epel-repo-on-an-rhel-8

How do I install the extra repositories such as Fedora EPEL repo on an Red Hat Enterprise Linux server version 8.x?

Introduction – You can easily install various packages by configuring an RHEL 8.x system to use Fedora EPEL repos and third party packages. Please note that these packages are not officially supported by Red Hat, Inc, but provides many popular packages and apps. This quick tutorial explains how to configure a Red Hat Enterprise Linux (RHEL) version 8.x to use the Fedora Extra Packages for Enterprise Linux (EPEL) repository.

Commands to install EPEL repo on an RHEL 8.x

The procedure to enable EPEL repository for an RHEL 8.x server is as follows:

  1. Open a shell prompt.
  2. Or login to an RHEL 8.x host called server1 using ssh client.
  3. Install epel using the following command: yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
  4. Refresh repo by typing the following command: yum repolist

Let us see all commands in details.

How to install EPEL repo on an RHEL 8.x

The following instructions assumes that you are running command as root user on an RHEL 8.x system and want to use use Fedora Epel repository.

Install Extra Packages for Enterprise Linux repository configuration

Just type the following yum command on an RHEL 8:
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Install EPEL Repo on an RHEL 8.x
Now that EPEL repo installed it is time to configure and use it. Hence, run the following command:
sudo yum update
Sample outputs:

Extra Packages for Enterprise Linux 8 - x86_64 198 kB/s | 430 kB 00:02 Red Hat Update Infrastructure 3 Client Configur 1.8 kB/s | 2.1 kB 00:01 Red Hat Enterprise Linux 8 for x86_64 - AppStre 25 MB/s | 8.6 MB 00:00 Red Hat Enterprise Linux 8 for x86_64 - BaseOS 21 MB/s | 6.3 MB 00:00 Dependencies resolved.
Nothing to do.
Complete!

List your new repos

Let us list our new repo using the yum command. In other words type the following command:
sudo yum repolist

Last metadata expiration check: 0:01:36 ago on Thursday 15 August 2019 08:13:39 AM UTC.
repo id repo name status
*epel Extra Packages for Enterprise Linux 8 - x86_64 310
rhel-8-appstream-rhui-rpms Red Hat Enterprise Linux 8 for x86_64 - AppStream from RHUI (RPMs) 5,739
rhel-8-baseos-rhui-rpms Red Hat Enterprise Linux 8 for x86_64 - BaseOS from RHUI (RPMs) 2,097
rhui-client-config-server-8 Red Hat Update Infrastructure 3 Client Configuration Server 8 3

How to search and install package from EPEL repo on RHEL 8

One can list all available packages under a repo named epel by typing the following command:
$ sudo yum --disablerepo="*" --enablerepo="epel" list available
OR use the grep command to filter out package names:
$ sudo yum --disablerepo="*" --enablerepo="epel" list available | grep 'package'
sudo yum --disablerepo="*" --enablerepo="epel" list available | grep 'screen'

Outputs:

Last metadata expiration check: 0:03:56 ago on Thursday 15 August 2019 08:13:35 AM UTC.
Available Packages
apachetop.x86_64 0.19.7-1.el8 epel
arj.x86_64 3.10.22-30.el8 epel
beecrypt.x86_64 4.2.1-23.el8 epel
beecrypt-apidocs.x86_64 4.2.1-23.el8 epel
beecrypt-devel.x86_64 4.2.1-23.el8 epel
bgpdump.x86_64 1.6.0-2.el8 epel
bird.x86_64 2.0.4-1.el8 epel
bird-doc.noarch 2.0.4-1.el8 epel
bodhi-client.noarch 4.0.2-2.el8.1 epel
bodhi-composer.noarch 4.0.2-2.el8.1 epel
bodhi-server.noarch 4.0.2-2.el8.1 epel
cc1541.x86_64 2.0-3.el8 epel
....
..
...
screen.x86_64 4.6.2-10.el8 epel
sendemail.noarch 1.56-4.el8 epel
sip-redirect.noarch 0.2.0-9.el8 epel
sshexport.noarch 2.4-1.el8 epel
tio.x86_64 1.32-1.el8 epel
x509viewer.noarch 0.1.0-5.el8 epel
x509watch.noarch 0.6.1-6.el8 epel
zerofree.x86_64 1.1.1-3.el8 epel

Examples

For example, search a package named screen and install it on RHEL 8 using EPEL repo. The commands are as follows (see yum our command guide for more info):

## search it ## sudo yum search screen ## get more info, if found ## sudo yum info screen ## install it ## sudo yum install screen
Installing screen package on an RHEL 8 using epel repo command
Installing screen package on an RHEL 8 using yum command from epel repo

Conclusion

And, there you have it, a more significant number of packages to install from EPEL repo on Red Hat Enterprise Linux (RHEL) version 8.x. See EPEL repo home page here for more information.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Discover more from WIREDGORILLA

Subscribe now to keep reading and get access to the full archive.

Continue reading