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
- OSRHEL 10.0 (Coughlan)
- Kernel6.12.0-55.9.1.el10_0
- dnf4.20.0
- Flatpak1.16.0
- TimeAbout 16 min
- Reviewed23 August 2026
Written against the versions above. `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.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RHCSA-A01 | 192.168.0.31 | RHEL 10.0 (Coughlan) | Practice node (graded) - spare /dev/sda | 2 Core | 4 GB | 50 GB + 15 GB |
| RHCSA-UTIL01 | 192.168.0.32 | RHEL 10.0 (Coughlan) | Utility - repository server and NFS exports | 2 Core | 4 GB | 50 GB |
Before you start
- A reachable repository. Here it is
http://192.168.0.32/rhel10/BaseOS. - The session writes and removes
/etc/yum.repos.d/extra.repo.
-
What a repository file looks like
-
Writing one by hand
-
Enabling and disabling without editing
-
Breaking it: a wrong baseurl
-
Breaking it: a wrong GPG key
-
What gpgcheck is actually for