1. Home
  2. Training Library
  3. DevOps
  4. Courses
  5. Red Hat Enterprise Linux Technical Overview

Overview of Cockpit

Developed with
Red Hat
play-arrow
Start course
Overview
DifficultyBeginner
Duration1h 43m
Students182
Ratings
5/5
starstarstarstarstar

Description

Red Hat Enterprise Linux (RHEL) is a rock solid commercial grade Linux operating system. If you're interested in learning RHEL from a system admins perspective then this course is for you!

The "Red Hat Enterprise Linux Technical Overview" course walks you through many of the basic system admin tasks and concepts required to administer RHEL effectively.

This course will provide you with insights to:

  • Working with the Terminal
  • Understanding the Kernel and User Spaces
  • Graphical User Interface
  • File management and the File System Hierarchy
  • Editing Files using Vim
  • Organizing Users and Groups
  • File Permissions
  • Managing Software
  • Configuring Networking
  • Controlling System Startup Processes
  • Introduction to Containers
  • Overview of Cockpit

Transcript

Hey guys, right now we are going to be talking about cockpit which is a web interface for monitoring and managing Linux systems. Now we need to get cockpit up and running so to do that we can make use of the command system CTL and we going to say enable --now so we're going to make sure that it just started persistently whenever systemd initializes. That is what the enable is all about and are we going to say if it's not started just yet, start it right now as well and we're going to do this for the unit file called cockpit.socket.

Cockpit is a web application essentially and it runs on TPC port 9090. So let's going to open up our web browser right now and we are going to make a connection to servera.lab.example.com and we're going to do so on TCP port 9090 up.

Even though you make use of http as the protocol it's going to re-directed to https automatically because we are going to be logging in and we want to send the data from my web browser to the web server in a secure manner. So what are we going to do right now is that we are going to be accepting that self signed certificate, so let's going to add the exception and we are going to be logging in as the student user right now so let's go and type in student as the password. 

What's really important is that if you want to do any kind of administration, first of all you would need the privilege to do so ultimately what this means is that you need to be a member of a group like wheel and you need to select this option over here that says reuse my password for privileged tasks. So let's go and login right now. And again what's really important to note is that you have this sort of visualization of the word privilege. So at this stage guys I'm just going to show you a couple of things. We're going to create a brand new user account so instead of making use of the user add command we can go to the left hand side here and click on Accounts. Let's go and create one for Rick Sanchez, there we go and the password is going to be redh@t123. Let's go and do that one more time redh@t123 click on create. And there you go, the user has been created. So the cool thing about cockpit is that you don't need to know every single command on your Linux systems it's a menu driven interface that is provided via the web user interface.

So we can click on Rick Sanchez right now we can go and change the properties associated with this account. I could go and set a password, I could go and force the password to change on the next login and again these are some of the things that we never taught you how to do, how to force a password change for a user when they next login. And cockpit is a wonderful way to to become comfortable with the Linux system and how to do basic administration without knowing too many too many commands. 

So now that we have created a user, let's go and do some network management so we're going to click on networking right now, and early on I taught you guys how to make use of the nmcli command again here we have an interface to networking so let's go to the network interface enp1s0 like I told you if your interface names begin with an en it's an Ethernet based interface and we could see its IP addresses, we can see other bits of data that may be important we could see as far as monitoring is concerned the data that is being sent and received or how much data is being sent and received. We could see the interface the MAC address of that interface over here. Of course the things that are in blue are clickable and you can see the IP address as well as the tcp/ip properties. So what we are going to do right now is go along and click on the IP address and you can see now we can go and fine-tune the IP configuration. We can go and change the IP configuration, with the IP address, subnet mask, gateway, and so forth what we are going to do right now is pretty much what I had shown you early on with the network manager command. 

We're going to add an IP address so we click the + sign, type in the IP address, specify the subnet mask, boom you're done let's going to add an additional DNS server click the + sign over here next to dns. Now we're going to go along and we're going to add 8.8.8.8 so at a few sort of clicks over here guys I've just reconfigured networking, I've added an additional IP address and it also added an additional DNS server and the job is done. You didn't even need to know how to make use of nmcli from the command line. As far as monitoring your system goes you can click on logs and you can see we have some items that we may want to be informed about so you can see that we are interested in over here errors and if you want all messages we can click on everything and we're going to see all kinds of logging data. 

Further to that guys what we can also do is manage software updates from within. So we just need a package called package kits in order to do this is not currently installed. And the other cool thing that we can do with cockpit is that we could get a shell so you could see that I've got a terminal window into server a that is provided from within the cockpit interface. Let's go and do some basic service management right now. So I'm clicking on services you can see the different types of units that I had described early on targets, services themselves, sockets, timers and pods. So what we going to do right now is let's go and restart Chrony. 

So here we have the NTP daemon over here, let's go and click on that wanna restart it piece of cake just click on the restart button from there of course if you needed to enable or disable services start to stop them again you would go to the unit that represents that particular service and you would go and do your management from there. Let's go to system at the top of a year this is what the Showcase is one of the the other aspects of cockpit this is the monitoring of the system so you could see that I've got two cores you can see the memory utilization over here, as well as disk i/o and network traffic and what we are going to do right now is simply go and restart this machine so let's go and click on the restart button so I'm going to say rebooting for maintenance and we're going to wait one minute before going along with that.

So, guys again if you are new to Red Hat Enterprise Linux and if you are not too comfortable with doing administration from the command-line have a look at cockpit because it's an easy-to-use interface.

About the Author
Students35724
Labs33
Courses93
Learning paths22

Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 20+ years. In recent times, Jeremy has been focused on DevOps, Cloud, Security, and Machine Learning.

Jeremy holds professional certifications for both the AWS and GCP cloud platforms.
 

Covered Topics