Skip to content

Latest commit

 

History

History

README.md

Package Management and Troubleshooting

Costa Rica

GitHub Open Source? Yes!

GitHub brown9804

Last updated: 2025-08-04


This is a summary based on References

Connect to the server:

ssh <user_name>@<IPadress>

Installing and Managing Packages on Debian/Ubuntu Systems

Understanding how to use package manager and installation utility apt to manage packages on Ubuntu/Debian Linux distributions.

Install the Apache Web Server Package:

Note: Ubuntu/Debian systems will usually start a service automatically, once its package is installed. You may need to update the package manager.

Update package:

sudo apt update

Install the packages:

sudo apt install apache2 wget

Verify the Server is Running and Capture the Result:

  1. Checking Apache server:
    curl http://localhost
  2. If that's working, we use the wget package to capture the output of an http request. We'll point the output to a file in our home directory called local_index.response
    wget --output-document=local_index.response http://localhost

Installing and Managing Packages on Red Hat/CentOS Systems

  1. Attempt to install the RPM to determine what dependencies are required:
cd Downloads
sudo rpm -i elinks-0.12-0.37.pre6.el7.0.1.x86_64.rpm

We'll get some dependency errors (version numbers may vary).

  1. Use the package manager to determine which packages provide the dependencies:
    sudo yum provides libmozjs185*

The output shows that the js package provides libmozjs185.

  1. Install the packages that provide those dependencies:
    sudo yum install js
  2. All of our dependencies were not resolved with that one package installation. Attempt to install the RPM again. If any other dependencies are needed, repeat steps 3 and 4 (substituting libmozjs185 with whatever dependency is still missing) to resolve that issue:
    sudo rpm -i elinks-0.12-0.37.pre6.el7.0.1.x86_64.rpm
  3. Once the RPM is installed successfully, run elinks to ensure the application is working properly:
    elinks
  4. Attempt to open a website by providing a URL:
    http://www.amazon.com

Troubleshooting RPM Issues:

Understand how to install telnet and install Apache.

  1. Become the root user:
    sudo -i

Telnet Installation:

  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
  1. 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
  1. Verify the integrity of the new RPM database:
    /usr/lib/rpm/rpmdb_verify Packages
  2. Query installed packages for errors:
    rpm -qa > /dev/null
  3. Rebuild the RPM database:
    rpm -vv --rebuilddb
  4. Install telnet:
    yum install -y telnet

Update Apache:

  1. Attempt to install Apache:
    yum install -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. Install Apache:
    yum install -y httpd

References

https://learn.acloud.guru/course/cad92c58-0fd2-4657-98f7-79268b4ff2db/dashboard

Total views

Refresh Date: 2025-10-29