CertGrid CertGrid
Hands-on Lab·Red Hat Certified System Administrator

RPM Repository Configuration

A write-a-file objective, and the most common way to lose it is to write the file, confirm with dnf repolist, and move on. repolist does not validate anything - it lists a broken repository as happily as a working one. That is demonstrated here, along with the command that does check.

Managing Software Guide 13 of 67 Intermediate

dnf config-manager --set-enabled and --set-disabled edit the .repo file rather than storing state elsewhere, which is shown below. On dnf 4 they come from dnf-plugins-core, which is installed by default on RHEL 10.

The repository being configured is served over HTTP by RHCSA-UTIL01.
Server NameIP AddressOSRolesCPURAMHDD
RHCSA-A01192.168.0.31RHEL 10.0Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB
RHCSA-UTIL01192.168.0.32RHEL 10.0Utility - repository server and NFS exports2 Core4 GB50 GB

This guide includes

Use this when a repository file has to be written by hand. This matters because the objective is the file itself - and the two ways it breaks announce themselves at completely different moments.

Before you start

  1. What a repository file looks like

  2. Writing one by hand

  3. Enabling and disabling without editing

  4. Breaking it: a wrong baseurl

  5. Breaking it: a wrong GPG key

  6. What gpgcheck is actually for

Official sources