Lab 26: Working With Packages in RHEL
Objective Focus
- Deploy, configure, and maintain systems
- Install and update software packages from Red Hat Content Delivery Network, a remote repository, or from the local file system
Official RHCSA EX200 Exam Objectives
What do you mean by “Package”?
A package refers to one or more files bundled together and packaged together with the “.rpm” extension. “RPM” stands for Red Hat package manager. Think of packages as a meal. They are comprised of different ingredients that all come together in the end as a meal.
Packages come in two flavors binary and source. For the sake of time, we focus on binary packages. These are ready to install and have various files that are needed for use.
Real quick, package naming convention
Understanding RPM (Red Hat Package Manager) naming conventions can feel like decoding a secret language at first, but it actually follows a strict, predictable formula. Once you know the anatomy, you can tell exactly what a package is, what version it is, and what system it’s meant for just by looking at the filename.
The standard RPM naming convention follows this structure:
Or, as it’s often abbreviated in the Linux world: NAME-V-R.A
The 4 Components of an RPM Name
Let’s break down a real-world example: openssh-server-8.7p1-8.el9.x86_64.rpm
1. Name (openssh-server)
This is the base name of the software package.
- It often indicates the software itself and sometimes the specific sub-component (like
-server,-develfor development files, or-libsfor libraries). - Hyphens are used to separate words within the name.
2. Version (8.7p1)
This is the upstream version number assigned by the original developers of the software.
- It tells you exactly which release of the source code is inside the RPM.
- It can include letters and numbers (e.g.,
p1for patch 1).
3. Release (8.el9)
This is the release number specific to the Linux distribution’s package maintainers (e.g., Red Hat, Fedora, Rocky Linux).
- Every time a maintainer fixes a bug, applies a security patch, or changes how the package is built without changing the core software version, this number goes up.
- The Distro Tag (
.el9): This is a crucial sub-component of the release. It indicates the distribution version it was built for..el9= Enterprise Linux 9 (RHEL, Rocky, AlmaLinux).fc40= Fedora Core 40
4. Architecture (x86_64)
This defines the hardware architecture the package was compiled to run on. If you try to install the wrong architecture, the package manager will stop you.
| Architecture | Meaning |
|---|---|
x86_64 / amd64 |
64-bit Intel or AMD processors (most modern servers/desktops). |
i686 / i386 |
32-bit Intel/AMD processors (older hardware). |
aarch64 / arm64 |
64-bit ARM processors (e.g., Raspberry Pi 4/5, AWS Graviton, Apple Silicon VMs). |
noarch |
No Architecture. This package contains scripts, documentation, or configuration files that are independent of hardware and can run on any system. |
Managing Packages with dnf
dnf is package manager for RPM-based Linux distributions.