Skip to main content

Troubleshooting RPM issues

Hands-On Lab

 

Photo of Michael Christian

Michael Christian

Course Development Director in Content

Length

01:00:00

Difficulty

Advanced

In this exercise, you will need to install telnet and update Apache.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Troubleshooting RPM issues

Introduction

In this exercise, you will need to install telnet and update Apache.

Solution

Start by logging in to the lab server using the credentials provided on the hands-on lab page:

ssh cloud_user@PUBLIC_IP_ADDRESS

Become the root user:

sudo su -

Install telnet

  1. Install the telnet package:

    yum install -y telnet
  2. Verify the integrity of the RPM database:

    cd /var/lib/rpm/
    /usr/lib/rpm/rpmdb_verify Packages
  3. Move Packages to Packages.bad and create a new RPM database from Packages.bad:

    mv Packages Packages.bad
    /usr/lib/rpm/rpmdb_dump Packages.bad | /usr/lib/rpm/rpmdb_load Packages
  4. Verify the integrity of the new RPM database:

    /usr/lib/rpm/rpmdb_verify Packages
  5. Query installed packages for errors:

    rpm -qa > /dev/null
  6. Rebuild the RPM database:

    rpm -vv --rebuilddb
  7. Install telnet:

    yum install -y telnet

Update Apache

  1. Attempt to update Apache:

    yum update -y httpd
  2. Edit /etc/yum.conf:

    vim /etc/yum.conf
  3. Remove the exclusion for httpd:

    exclude=httpd
  4. Save and close the file:

    :wq
  5. Upgrade Apache:

    yum update -y httpd

Conclusion

Congratulations, you've completed this hands-on lab!