Linux Hands-On Lab - Installing and Managing Packages on Debian/Ubuntu Systems

Linux Hands-On Lab - Installing and Managing Packages on Debian/Ubuntu Systems

Linux Learning Path for Cloud and DevOps Engineers

📝Introduction

This post explains how we can Install and Managing Packages on Debian/Ubuntu Systems.

The installation and removal of packages is a core skill for anyone managing Linux distributions. During this activity, we will work with the package manager and installation utility apt to manage packages on Ubuntu/Debian Linux distributions.

You've been provisioned with an Ubuntu 16.04 LTS server and will need to install the Apache web server and wget on it.

📝Log in to the AWS Management Console

Using your credentials, make sure you're using the right Region. In my case, I am using AWS as my cloud provider and chose us-east-1. However, you are free to choose any cloud provider and create your 2 Linux Server VMs (I am using a CentOS 7 distro) for this hands-on lab.

One of the servers will be our main server and the other our client-server.

📌Note: You must create the AWS Access Key and AWS Secret Access Key and configure the AWS CLI in the terminal to use it.

You can use link1 and link2 for it.

📝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.

  • First, let's update our package information:

      sudo apt update
    
  • Now we can install the packages:

      sudo apt install apache2 wget -y
    

📝Verify the Server is Running and Capture the Result

  • The Apache web server should be running, but let's check:

      curl http://localhost
    

  • 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
    

    📌Note - At the end of each hands-on Lab, always clean up all the resources previously created to avoid being charged if you used a Cloud Provider to provision them.

    Congratulations — you have completed this hands-on lab covering the basics of installing and Managing Packages on Debian/Ubuntu Systems using apt and wget commands.

    Thank you for reading. I hope you understood and learned something helpful from my blog.

    Please follow me on CloudDevOpsToLearn and LinkedIn, franciscojblsouza