Configuring Repositories with DNF

15 minutes
  • 3 Learning Objectives

About this Hands-on Lab

DNF allows for many repositories to be utilized simultaneously and provides configurations for controlling each individually. In this hands-on lab, you will be tasked with modifying global and individual repository configurations and ensuring that only specific repositories are enabled.

*This lab is not approved or sponsored by Red Hat.*

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Modify the Global Repository Configurations

Using a text editor, modify the dnf.conf file so that gpgcheck is set to 1 and installonly_limit is set to 3.

Modify the EPEL Repository Configurations

Using a text editor, modify the [epel] repo section in the epel.repo file with the following configurations:

  • Comment out the baseurl option.
  • Uncomment the metalink option.
  • Update the gpgcheck option to be equal to 1.
Enable and Disable Repositories
  • Enable the epel repository.
  • Disable the epel-testing repository.

Additional Resources

You work as part of a team of Linux administrators and have been tasked with updating one of the hosts you administer. The host was being used to vet the EPEL repository for its potential use on the rest of the Linux servers. Now that the repository has been accepted, you will need to modify and enable it. This involves modifying the global DNF configurations as well as the EPEL-specific configurations so that they are in line with best practices. Once the configurations are updated, you will need to enable the epel repository and disable the epel-testing repository, which was being used during the vetting process.

Note:

  • All tasks should be performed as the cloud_user.
  • The cloud_user has been given sudo access to perform the required tasks.

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?