yum is a tools used to management
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. This 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 branch. Single repository may have multiple different branch for different purposes. We can list configuration with
cat command like below. We will print the repository
$ cat /etc/yum.repos.d/fedora.repo
There are different confugration options.
nameis the name of the repo
failovermethodused what will be done if there is a problem
baseurlis the URL to download repository database and information
metalinkis the URL the metadata of the repository
enabledspecified whether this repository is enabled and usable. We can disable if we do not want to use further.
metadata_expirespecifies how long the downloaded metadata is fresh and useable
pgpcheckis a security mechanism which checks package is altered or created by the repository owner.
gpgkeyis 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 URLl 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.