Day 5 — Package Management Practicals (RHEL 10: DNF & YUM)
🎯 What This Lab Covers
Package Management Practicals (RHEL 10: DNF & YUM)
🎯 What This Lab Covers
In this session, I practiced real-world package management on RHEL 10 using DNF (the default package manager). I also referenced YUM for compatibility, since many legacy systems and documentation still use yum.
The goal is to understand how to install, inspect, update, and remove software, and what each command actually does on a running Linux system.
⚠️ Important Real-World Note (RHEL 10)
On RHEL 10, most software repositories require system registration:
subscription-manager status
If the system is not registered and attached to a valid subscription, dnf may not find packages such as nginx.
This is a common real-world issue when provisioning new RHEL servers.
You need a RedHat Developer account to be able to register your Red Hat Linux.
✅ Prerequisites
- A Red Hat account (free Developer account works)
👉 https://developers.redhat.com/register
- Internet access on your RHEL VM
- Root or sudo access
🔹 Step 1: Check your RHEL version (optional, for documentation)
cat /etc/redhat-release
Example output:
Red Hat Enterprise Linux release 10.x

Good to screenshot or note this.
🔹 Step 2: Register the system
Run this as root or with sudo:
sudo subscription-manager register
You’ll be prompted for:
- Red Hat username
- Password
If successful, you’ll see:
The system has been registered with ID: xxxxxxxx-xxxx-xxxx

Registration Successful Output
Installing a Real Service with DNF
For this lab, we will use DNF to install a real-world service called Nginx.
This simulates how administrators install production software such as web servers, application runtimes, and system tools on live servers.
We’ll also show the equivalent YUM commands to understand legacy workflows and documentation.
🌐 What is Nginx and Why Use It?
Nginx is a high-performance web server and reverse proxy commonly used in production environments to:
- Host websites and web applications
- Act as a reverse proxy in front of backend services
- Load-balance traffic across multiple servers
- Serve static files efficiently
It is widely used in enterprise environments, cloud platforms, and container-based architectures. Practicing with Nginx provides hands-on experience with installing and managing real services you would encounter as a system administrator.
1️⃣ Searching for the Package (DNF & YUM)
dnf search nginx
YUM equivalent:
yum search nginx
Explanation:
Searches enabled repositories for packages related to nginx. This helps confirm that the package is available before installation.
Don’t forget; if on normal user use sudo, if on root you do not need sudo
Both dnf and yum will return the same output

DNF & YUM Output
2️⃣ Viewing Package Details
dnf info nginx
Explanation:
Displays metadata such as version, repository source, size, and a description of Nginx. This helps verify what you are about to install and from where.

Output for nginx info
3️⃣ Installing Nginx
sudo dnf install nginx
Explanation:
Downloads and installs Nginx along with all required dependencies. DNF automatically resolves and installs any supporting libraries needed for Nginx to run.
Also it depend on how good your internet is, that is how fast the installation is going to be.
- You can also install nginx by bypassing the installatio questions by using dnf install -y nginx

dnf install nginx output
4️⃣ Verifying Installation
rpm -q nginx
Explanation:
Queries the RPM database to confirm that Nginx is installed and shows the installed version. This verifies the actual state of the system rather than assuming the installation succeeded.

5️⃣ Updating Nginx
sudo dnf upgrade nginx
Explanation:
Upgrades Nginx to the latest available version from the repositories. This is how administrators apply security patches and bug fixes to installed services.

Nothing to do because, the nginx is up to date
6️⃣ Updating All Packages on the System
sudo dnf upgrade
Explanation:
Updates all installed packages to their latest versions. This is typically done during maintenance windows in production environments.
7️⃣ Removing Nginx
sudo dnf remove nginx
Explanation:
Uninstalls Nginx and removes any dependencies that were installed solely for it and are no longer required.

nginx remove output
8️⃣ Listing Installed Packages
dnf list installed
Explanation:
Displays all packages currently installed on the system. Useful for auditing, documentation, and troubleshooting.
9️⃣ Finding Which Package Provides a Command
dnf provides /usr/bin/python3
Explanation:
Identifies which package owns a specific file or command. This is useful when troubleshooting missing commands.

🔟 Viewing Package Transaction History
dnf history
Explanation:
Shows a history of package installations, upgrades, and removals. This is useful for auditing changes and diagnosing issues caused by recent updates.

dnf history output
Day 5 complete.
Practiced real-world package management with DNF and YUM on RHEL 10.
메타데이터
- post_id
- 02158cbf6d99
- slug
- day-5-package-management-practicals-rhel-10-dnf-yum-02158cbf6d99
- url
- https://medium.com/@bamidelebabatundem/day-5-package-management-practicals-rhel-10-dnf-yum-02158cbf6d99
- canonical_url
- https://medium.com/@bamidelebabatundem/day-5-package-management-practicals-rhel-10-dnf-yum-02158cbf6d99
- author_url
- https://medium.com/@bamidelebabatundem
- status
- ok
- fetched_at
- 2026-06-22 08:06:21