SYS: Install and update software packages from Red Hat Network, a remote repository, or from the local file system.

Share this link

Note: This is an RHCSA 7 exam objective and an RHCE 7 exam objective.


This topic is so broad that it is necessary to divide it into several parts:

Additional Resources

You can also download the Red Hat Yum command cheat sheet.
Sander van Vugt provides an interesting video about installing and updating software packages (7min/2016).
Additionally, you can watch Red Hat videos about Resolving Dependencies Issues (9min/2016) or How do I manage software in RHEL? (13min/2017).

Although not in the RHCSA and RHCE curriculums, you should become familiar with the deltarpms and learn to use CentOS Continuous Release repository.
At some point, you may want to prevent some packages from being updated.
Also, you can read this mail to better understand rpmnew and rpmsave files.
You can also read this article about the installation of Foreman on CentOS 6.
In addition, you can learn how RedHat manages the Secure distribution of RPM packages.
Finally, if you plan to create new RPM packages (still not part of RHCSA/RHCE curriculums), you need to read the RPM Packaging Guide.

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5.00 out of 5)
10 comments on “SYS: Install and update software packages from Red Hat Network, a remote repository, or from the local file system.
  1. mehboob says:

    Hi Admin
    In RHEL7 exam do we have to create a yum repository. If yes at least what configuration is required to make yum install the packages.


  2. Ahmad says:

    Hi CertDepot,

    Can you please help on the below:

    1-When creating a repositories (local or remote), there is a gpgkey configuration, is this included in the RHCSA objective?

    2-What is the normal in the exam, to configure a remote repo or local?

    3-Is the below configuration correct when creating a local repository :

    # mkdir -p /repos/local
    # mount -o loop rhel-server.iso /repos/local
    # cd /etc/yum.repos.d
    # vim home.repo
    # yum clean all
    # yum repolist
    # yum list all

    4-If they asked to install suitable kernel from , what should the full answer be?

    Thanks in advance!

    • CertDepot says:

      1) I don’t know. I didn’t specify anything in my tutorial.
      If they explicitly ask you to set up a given remote repository with gpgkey, they will have to give you the public key and you will have to import it. If it is a local repository, the key is in the iso image.
      2) You need to be able to configure both.
      3) I think your instructions seem fine. Additionally, I would put the mount instruction in the /etc/fstab file to set it up permanently.
      4) yum install

      • Ahmad says:

        Thanks a lot for your quick response,

        on point 3: how should the entry in /etc/fstab be like, based on my configuration above.

        on point 4: if they ask to update the kernel from a remote repository like http://…….etc. Then I should configure a new repository as below:

        # vim /etc/yum.repos.d/kernel.repo
        name=kernel repo
        baseurl={the same link given}
        # yum clean all; yum list all; yum repolist
        # uname -u -to verify the old version
        # yum install kernel
        # reboot

        For this question we create another remote repository (the first one was for the rhcsa exam) . My question, when we issue #yum install kernel, which repository is going to be used. (the one we created for the kernel or the one for the rest for rhcsa exam).

        Sorry I am a bit confusing at this point and hope you help on the same.

        Also, I would like to thank each member who works on this great and wonderful site, really the best in the whole world.

        Your help is highly appreciated!


        • CertDepot says:

          3) We assume the iso image called /root/rhel-server.iso
          Write the following line in the /etc/fstab file:
          /root/rhel-server.iso /repos/local iso9660 defaults,loop 0 0
          4) When you type yum install “”, no repository is used.

  3. stefano says:

    I understood how to configure a local repository but I have a question. The exam asks also to install a package using a specific repository instead of another one? If so could you tell me how to perform it please? Thanks

    • Lisenet says:

      If you have a package available in more than one repository, you can tell yum which one you don’t want to use.

      For example, I have “lynis” package available from epel repo and lynis repo. If I want it installed from the latter, I would do something like this:

      # yum install –disablerepo=epel lynis

Leave a Reply

Upcoming Events (Local Time)

There are no events.

RHCSA7: Task of the day

Allowed time: 10 minutes.
Archive and compress the content of the /opt directory (create files if none exists).
Uncompress and unarchive the resulting file in /root

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a httpd virtual server called "dummy" with DocumentRoot assigned to /opt.

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...