How to Enable RPMForge Repository in RHEL/CentOS 8?


Introduction

The RPMForge repository is a third-party package repository that contains various software packages that are not available in the default repositories of RHEL/CentOS 8. The repository provides additional software packages, updates, and patches that can be installed on your system to enhance its functionality and performance.

By enabling RPMForge, you will have access to a vast range of software packages for RHEL/CentOS 8 that are otherwise unavailable. One of the main reasons why it's important to enable RPMForge repository in RHEL/CentOS 8 is because it provides access to software packages that are essential for system administrators and developers.

Checking for Existing Repositories

Before enabling RPMForge repository, it is important to check whether there are any existing repositories already enabled on your RHEL/CentOS system. This is necessary because enabling multiple repositories can lead to conflicts and errors during package installation.

The easiest way to check for existing repositories is by using the yum repolist command. This command lists all the repositories that are currently available on your system.

To use this command, open a terminal and type −

yum repolist 

After running this command, you will see a list of all the enabled repositories along with their status (enabled or disabled) and the number of packages available in each repository. If you see multiple entries for a repository (e.g., base, extras, updates), it means that different versions of the same repository are enabled.

It is also possible to check for specific repositories by using the grep command along with yum repolist. For example, to check if the base repository is enabled on your system, run −

yum repolist | grep "base" 

If the base repository is enabled, you will see its name along with its status and package count.

Before enabling RPMForge repository in RHEL/CentOS 8, it is important to check for existing repositories using the yum repolist command. This ensures that there are no conflicts between different repositories during package installation.

Enabling RPMForge Repository

Enabling RPMForge repository in RHEL/CentOS 8 is a straightforward process that involves adding the repository's YUM/DNF configuration file to the /etc/yum.repos.d/ directory. Before enabling RPMForge, it is recommended to check for existing repositories using the yum repolist command. This will help you avoid conflicts that may arise from enabling multiple repositories with similar packages.

To enable RPMForge repository in RHEL/CentOS 8, follow these steps −

  • Download and install the appropriate RPMForge release package for your system using wget or curl command.

    For example, for CentOS 8 −

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.3-1.el8.rf.x86_64.rpm 
dnf install rpmforge-release-0.5.3-1.el8.rf.x86_64.rpm 
  • After installing the package, use your preferred text editor to open the newly added configuration file located at /etc/yum.repos.d/rpmforge.repo.

nano /etc/yum.repos.d/rpmforge.repo 
  • Set enabled=1 in the [rpmforge] section of the configuration file.

[rpmforge] 
name = RHEL $releasever - RPMforge.net - dag 
baseurl = http://apt.sw.be/redhat/el$releasever/en/$basearch/dag 
enabled = 1 # set to 1 to enable this repository 
gpgcheck = 1 
gpgkey = http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt 
protect = 0 
priority=10 
... 
  • Save and close the configuration file.

You have successfully enabled RPMForge repository in RHEL/CentOS 8. You can now use yum or dnf package managers to install packages from RPMForge, such as ffmpeg, ffmpeg-devel, and many others.

Verifying Repository Availability

Once you have successfully enabled RPMForge repository on your RHEL/CentOS 8 system, it is important to verify whether or not the repository is available. Verifying repository availability ensures that you can install packages from the repository without any issues. In this section, we will discuss how to verify if RPMForge repository is successfully enabled and provide examples of commands that can be used to check for its availability.

Verifying RPMForge Repository

To verify if RPMForge repository is successfully enabled, you can use the yum repolist or dnf repolist commands. These commands display a list of all repositories available on your system, along with their enabled status and the number of packages they contain. To check if RPMForge is available using yum, run the following command −

sudo yum repolist 

If RPMForge is successfully enabled and available, it should appear in the output along with other repositories installed on your system −

repo id 
repo name 
status !AppStream CentOS-8 - AppStream 5,090 
!BaseOS CentOS-8 - Base 2,843 !epel Extra Packages for Enterprise Linux 8 - x86_64 4,510 
!extras CentOS-8 - Extras 17 RPMforge RHEL/CentOS-$releasever - RPMforge.net - dag 1,173 

If you are using dnf package manager instead of yum on RHEL/CentOS 8 system, then run the following command to check whether RPmforge repository has been added −

sudo dnf repolist 

This will give an output similar to this −

repo id repo name status 
AppStream CentOS-8 - AppStream 4.9 kB/s | 7.8 kB 00:01 BaseOS CentOS-8 - Base 3.1 kB/s | 3.9 kB 00:01 
extras CentOS-8 - Extras 464 B/s | 1.5 kB 00:03 *epel Extra Packages for Enterprise Linux 2.2 MB/s | 4.6 MB 00:02 
RPMforge RHEL/CentOS-$releasever - RPMforge.n 807 B/s | 11 kB 00:14 

If the RPMforge repository is not available or is missing from the output, it means that there was an issue with enabling it and you may need to revisit the steps in the previous section to resolve any issues.

Verifying repository availability is an important step in ensuring that you can install packages from RPMForge repository without any issues. By following these steps and checking for availability, you can ensure that RPMForge is successfully enabled on your RHEL/CentOS system and ready to use for package installation needs.

Installing Packages from RPMForge Repository

Now that you have successfully enabled the RPMForge repository in your RHEL/CentOS 8 system, it's time to install packages from it. You can use either yum or dnf package managers to install packages from RPMForge. However, dnf is the recommended package manager for CentOS/RHEL 8 systems as it provides better dependency resolution and other features.

Using yum Package Manager

If you prefer to use yum package manager, you can install packages from RPMForge using the following command −

$ sudo yum --enablerepo=rpmforge install <package-name>

Replace <package-name> with the name of the package you want to install. For example, if you want to install VLC media player from RPMForge, run the following command −

$ sudo yum --enablerepo=rpmforge install vlc

Yum will download and install all required dependencies along with VLC media player package. Once installed, you can launch VLC media player by typing "vlc" in the terminal or searching for it in the application menu.

Using dnf Package Manager

If you prefer to use dnf package manager, first clean up any metadata cache by running −

$ sudo dnf clean all

To search for a specific package available in RPMForge repository using dnf, run −

$ sudo dnf --enablerepo=rpmforge search <package-name>

If a match is found, you can proceed with installing the package by running −

$ sudo dnf --enablerepo=rpmforge install <package-name>

For example, if you want to install the popular video editor OpenShot from RPMForge, run −

$ sudo dnf --enablerepo=rpmforge install openshot

dnf will automatically download and install all necessary dependencies for the package. Once installed, you can launch OpenShot by typing "openshot" in the terminal or searching for it in the application menu.

Conclusion

Enabling RPMForge repository in RHEL/CentOS 8 is crucial for system administrators who need access to a wider range of packages. With RPMForge, users can install additional software that might not be available in the default repositories. In this article, we have discussed the steps required to enable RPMForge repository in RHEL/CentOS 8.

Updated on: 08-Jun-2023

406 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements