Getting Hands-on with Cockpit on CentOS 7

1 hour
  • 5 Learning Objectives

About this Hands-on Lab

In this hands-on lab, we will be managing two CentOS 7 web server instances using Cockpit.

Specifically, we will:

– Install and Configure Cockpit on CentOS 7
– Manage Storage Using Cockpit
– Manage Networking Using Cockpit
– Manage systemd Services Using Cockpit
– Patch the CentOS 7 Servers Using Cockpit

When the lab is complete, you will have a solid understanding of how to manage a Linux server using Cockpit.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Install and Configure Cockpit on CentOS 7

Install and Configure Cockpit on CentOS 7 (Duration: 20 minutes):

  • Install and configure Cockpit on both instances of CentOS 7
  • Configure the Cockpit installation on the first instance to manage the second instance

For more information on installing and configuring Cockpit, see: Running Cockpit — Cockpit Project

Manage Storage Using Cockpit

We will take a look at storage management (Duration: 10 minutes):

  • Create a new RAID-1 volume (web_data) for website data:
    • Partition, format, and configure a mount point at /web_data
    • Use two disks
  • Create a new volume group (web_vg):
    • Add the remaining disk to it
  • Create and format a new logical volume for the logs (web_logs):
    • Create the web_logs logical volume in the web_vg volume group
    • Format the logical volume
    • Mount the new logical volume on the /web_logs directory

Configure the storage on both instances as described above.

Manage Networking Using Cockpit

We will take a look at network management (Duration: 10 minutes):

  • Modify our firewall configuration to enable HTTP traffic
  • Monitor network traffic
  • Review network interfaces
  • Review networking logs

Configure the firewall on both instances as described above.

Manage systemd Services Using Cockpit

We’re going to look at using Cockpit to manage systemd services (Duration: 10 minutes):

  • Enable the nginx web server service
  • Start the nginx web server service
  • Confirm that the nginx service is enabled and running
  • Connect to the nginx web server via your web browser (on port 80) to confirm the nginx service is working

Configure the nginx service on both instances as described above. Confirm that nginx is working on both instances.

Patch the CentOS 7 Servers Using Cockpit

Finally, we will use Cockpit to make sure the CentOS 7 installation on both instances is up-to-date, and if not, update them. We’ve allocated 10 minutes for this activity. Feel free to explore Cockpit once this is complete!

Additional Resources

We're about to launch a class about NGINX, and need to set up a pair of CentOS 7 instances that we can clone for each student to work with. The students will be responsible for managing their pair of instances, so we're going to equip the students with Cockpit. We will configure Cockpit on the first instance to manage the second instance, so students only have to log in to one interface.

When the lab starts, you will want to open an SSH connection to both CentOS 7 instances:

ssh cloud_user@PUBLIC_IP_ADDRESS

Replace PUBLIC_IP_ADDRESS with either the public IP or DNS of the instance. The cloud_user password has been provided with the instance information.

You will also want to open a web browser that is friendly with self-signed certificates (like Firefox) so you can connect to the Cockpit management console on each instance once they are up and running.

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.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!