Bookmark this page

Guided Exercise: Enabling Software Repositories

In this lab, you will configure your server to use a separate yum repository to obtain updates, and update your machine.

Outcomes

The system will be configured to obtain software updates from a classroom server and the system will be running the latest Linux kernel.

Reset your serverX system.

  1. Configure the system to obtain software from two classroom repositories:

    • Classroom packages provided at http://content.example.com/rhel7.0/x86_64/rht

    • Updates provided at http://content.example.com/rhel7.0/x86_64/errata

    1. Use yum-config-manager to add the classroom packages repository.

      [root@serverX ~]# yum-config-manager --add-repo="http://content.example.com/rhel7.0/x86_64/rht"
      Loaded plugins: langpacks
      adding repo from: http://content.example.com/rhel7.0/x86_64/rht
      
      [content.example.com_rhel7.0_x86_64_rht]
      name=added from: http://content.example.com/rhel7.0/x86_64/rht
      baseurl=http://content.example.com/rhel7.0/x86_64/rht
      enabled=1
      
    2. Create the file /etc/yum.repos.d/errata.repo to enable the “Updates” repository with the following content:

      [updates]
      name=Red Hat Updates
      baseurl=http://content.example.com/rhel7.0/x86_64/errata
      enabled=1
      gpgcheck=0
      
  2. Use yum-config-manager to disable the classroom packages repository.

    [root@serverX ~]# yum-config-manager --disable content.example.com_rhel7.0_x86_64_rht
    Loaded plugins: langpacks
    ================= repo: content.example.com_rhel7.0_x86_64_rht =================
    [content.example.com_rhel7.0_x86_64_rht]
    ...
    enabled = 0
    ...
  3. Update all relevant software provided using yum update.

    [root@serverX ~]# yum update -y
  4. Verify that there are two versions of the kernel installed. Which version is currently in use?

    [root@serverX ~]# yum list kernel
    
    [root@serverX ~]# uname -r
    
    
  5. Reboot your serverX, then repeat the previous step. Which version is currently in use?

    [root@serverX ~]# yum list kernel
    
    [root@serverX ~]# uname -r
    
    
  6. List, then install, the rht-system package.

    [root@serverX ~]# yum list rht*
    Loaded plugins: langpacks
    Available Packages
    rht-system.noarch                      1.0.0-2.el7                       updates
    [root@serverX ~]# yum -y install rht-system
    Loaded plugins: langpacks
    Resolving Dependencies
    ...
Revision: rh199-7-d0984a3