yum
is a tool used to manage rpm packages in distributions like RedHat, CentOS, Fedora, etc. Most know feature of yum is using repositories in order to manage packages download and resolve dependencies. In this tutorial, we will examine the yum
repository configuration.
List Yum Repository Configurations
yum
repositories are stored as files with related configuration. These configuration files are stored in /etc/yum.repos.d/
. We can list currently created repositories with ls
command like below.
$ ls /etc/yum.repos.d/

Repository Configuration Files
Each of these configuration files holds some configuration a single or multiple branches. A single repository may have multiple different branches for different purposes. We can list configuration with cat
command like below. We will print the repository fedora.repo
.
$ cat /etc/yum.repos.d/fedora.repo

There are different confugration options.
name
is the name of the repofailovermethod
used what will be done if there is a problembaseurl
is the URL to download repository database and informationmetalink
is the URL the metadata of the repositoryenabled
specified whether this repository is enabled and usable. We can disable if we do not want to use further.metadata_expire
specifies how long the downloaded metadata is fresh and useablepgpcheck
is a security mechanism which checks package is altered or created by the repository owner.gpgkey
is the GPG key file path
Add New Yum Repository
There are different ways to add a yum repository. We can use yum
command to add repository too. We will use localinstall
command and provide the rpm
URL with --nogpgcheck
option like below.
$ sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rp

Top External Third Party Repositories
Here we will list 3rd party yum
repositories which is very useful.
- https://rpmfusion.org/
- https://fedoraproject.org/wiki/EPEL
- https://blog.remirepo.net/
- http://elrepo.org/tiki/tiki-index.php
- https://webtatic.com/