Last updated on August 9, 2020 by Dan Nanni
While CentOS/RHEL platforms maintain several official repositories (e.g.,
contrib), they are lacking in terms of software coverage and release cycles. To bridge the gap between what is available and what is commonly needed, third-party repositories are created to serve community needs for commonly requested software packages.
One such third-party software repository for CentOS/RHEL is ELRepo (The Community Enterprise Linux Repository). ELRepo is actually one of few "community-approved" repositories due to its high maintenance quality.
ELRepo is especially well-known as a repository of hardware/device drivers and mainline kernel images for CentOS/RHEL. The repository carries a large number of the latest drivers for filesystems, graphics cards, network cards, sound cards, webcams, and displays. If you want to enhance your experience with various hardware devices in CentOS/RHEL-based enterprise Linux environment, it is recommended to enable ELRepo repository. ELRepo consists of the following four channels that you can enable separately.
elrepoOffers packages not contained in CentOS/RHEL distributions. Enabled by default.
elrepo-kernelOffers the LTS kernels and the latest stable kernels. Disabled by default.
elrepo-extrasOffers packages that replace or update CentOS/RHEL distributions. Disabled by default.
elrepo-testing: Offers packages that will soon move to
elrepo. Disabled by default.
To set up ELRepo repository, you need to import its official GPG key and then install ELRepo RPM as follows.
$ sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org $ sudo rpm -Uvh https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
$ sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org $ sudo rpm -Uvh https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
To verify ELRepo has been installed and enabled successfully, run the following:
$ yum repolist enabled
The output should indicate that
elrepo (ELRepo's main channel) is enabled by default.
To see all available packages in the
$ yum --disablerepo="*" --enablerepo="elrepo" list available
Similarly, to find a list of all available packages in the
$ yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
To install a package from ELRepo's main channel (which is enabled by default), simply use
yum command as usual:
$ sudo yum install nvidia-x11-drv
Depending on packages, you may need to disable other non-elrepo repositories.
$ sudo yum --disablerepo="*" --enablerepo="elrepo" install nvidia-x11-drv
If you want to install a package from any other channel in ELRepo, you must explicitly enable it:
$ sudo yum --enablerepo="elrepo-kernel" install kernel-ml
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.