Install and update software packages from Red Hat Content Delivery Network, a remote repository, or from the local file system

7. Deploy, Configure, and Maintain Systems

πŸ“˜Red Hat Certified System Administrator (RHCSA – EX200)


Software packages are the building blocks of Linux systems. They include applications, utilities, and tools that make your system functional. In RHEL, packages are usually managed in the RPM format (Red Hat Package Manager).

There are three main ways to install or update software on RHEL:

  1. From the Red Hat Content Delivery Network (CDN)
  2. From a remote repository
  3. From the local file system

We will go through each method step by step.


1. Using Red Hat Content Delivery Network (CDN)

The Red Hat CDN is the official source for RHEL software updates and packages. You need a valid Red Hat subscription to access it.

Steps to use CDN

  1. Register your system with Red Hat Command: sudo subscription-manager register You will need your Red Hat username and password.
  2. Attach your subscription sudo subscription-manager attach –auto This attaches the system to an available subscription automatically.
  3. Enable repositories List available repositories: sudo subscription-manager repos –list Enable a repository (for example, RHEL 9 BaseOS): sudo subscription-manager repos –enable=rhel-9-for-x86_64-baseos-rpms
  4. Install packages from CDN Use dnf (the default package manager in RHEL 8 and above) or yum (RHEL 7). Example: sudo dnf install vim This will download and install the latest vim editor from the CDN repository.
  5. Update packages To update all packages: sudo dnf update

Key points for the exam:

  • You must register with Red Hat to access CDN.
  • subscription-manager is required to manage subscriptions.
  • dnf is the preferred package manager in RHEL 8+.

2. Using a Remote Repository

A remote repository is any server hosting RPM packages. These are not necessarily from Red Hat but can be other trusted sources (like EPEL or third-party repositories).

Steps

  1. Add the repository Create a .repo file in /etc/yum.repos.d/. For example: sudo nano /etc/yum.repos.d/epel.repo Add content like: [epel]
    name=Extra Packages for Enterprise Linux
    baseurl=https://download.fedoraproject.org/pub/epel/9/$basearch
    enabled=1
    gpgcheck=1
    gpgkey=https://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9
  2. Clean metadata sudo dnf clean all
    sudo dnf makecache
  3. Install packages from the remote repository sudo dnf install htop
  4. Update packages from the repository sudo dnf update htop

Key points for the exam:

  • Remote repositories must be configured in .repo files.
  • Use dnf makecache to update repository metadata.
  • dnf install and dnf update work with remote repos just like with CDN.

3. Installing from the Local File System

Sometimes, you have RPM files downloaded locally. This can happen when you don’t have internet access.

Steps

  1. Install a local RPM sudo dnf install /path/to/package.rpm Example: sudo dnf install ~/Downloads/httpd-2.4.51-1.el9.x86_64.rpm
  2. Upgrade a local RPM sudo dnf upgrade /path/to/package.rpm
  3. Check package information rpm -qi httpd

Key points for the exam:

  • dnf install works for both remote and local packages.
  • Always provide the full path to the .rpm file if installing locally.
  • Use rpm -qa to list all installed packages.

Important Commands Summary

TaskCommand
Register systemsudo subscription-manager register
Attach subscriptionsudo subscription-manager attach --auto
List repositoriessudo subscription-manager repos --list
Enable repositorysudo subscription-manager repos --enable=<repo>
Install package from repo/CDNsudo dnf install <package>
Update all packagessudo dnf update
Install local RPMsudo dnf install /path/to/file.rpm
Upgrade local RPMsudo dnf upgrade /path/to/file.rpm
List installed packagesrpm -qa
Show package inforpm -qi <package>

Exam Tips

  1. Know how to register your system with Red Hat and attach a subscription.
  2. Be able to enable or disable repositories.
  3. Be comfortable with installing and updating packages from:
    • CDN (official source)
    • Remote repositories (third-party)
    • Local RPM files (offline installation)
  4. Understand the difference between dnf (recommended) and rpm (low-level, works locally).
  5. Always check your repository and package sources before installing.

βœ… Summary:
In RHCSA, you need to be able to install and update software packages using all three methods: CDN, remote repositories, and local RPMs. dnf is your main tool, and subscription-manager is required for Red Hat official content. Remember the commands and be comfortable switching between online and offline installation.

Buy Me a Coffee