Installing an RPM Package

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this hands-on lab, we will install an RPM package on a CentOS7 system. On rpm-based Linux distributions, we can install rpm packages using the `rpm` command.

This gives us the hands on experience of installing and removing rpm packages directly, without the use of a more comprehensive package manager like yum.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install the `htop` RPM Package
  1. The htop RPM package is located in the cloud_user home directory. In order to install the package, we need to elevate our permissions using sudo. If you don’t see the rpm file, wait a minute and re-run the ls command.
  2. Run the following command to elevate permissions and install the RPM package (Disregard the NOKEY warning):

    Use the following command to install the package:

    sudo rpm -i htop-2.2.0-3.el7.x86_64.rpm
Run the `htop` Application
  1. Now that htop is installed, we can run it with the htop command.

    This utility shows us system load and running processes.

  2. We can exit the application by pressing the Q key.
Remove the `htop` Package
  1. Use RPM to remove the htop package.
    sudo rpm -e htop
  2. Try re-running the htop command to verify it is uninstalled.

Additional Resources

An RPM file has been placed into the cloud_user home directory at /home/cloud_user.

Follow along with the video as we install the RPM package, run the new utility it provides, and then remove the package.

Note: Please wait about 2 minutes before starting the lab to make sure the lab has fully provisioned and use a standalone SSH Client instead of the Instant Terminal (in order for htop to display).

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?