How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24

7

Cockpit is a web-based administration tool for the system admin to manage and monitor the local system, as well as the remote Linux servers in your infrastructure.

The Cockpit console lets you perform a wide range of administration tasks, including:

  1. Manage remote machines in a single Cockpit console
  2. Manage
    Podman containers
  3. Modify Network interfaces
  4. Manage Virtual Machines
  5. Manage user accounts
  6. Web-based terminal
  7. View system performance in a graph.
  8. Collect system configuration and diagnostic information with the use of sosreport.

Here, we will see how to install Cockpit on
CentOS 8 /
RHEL 8.

Install Cockpit

CentOS 8 /
RHEL 8 includes the Cockpit installed by default during the
OS installation except for the minimal installation.

Install the Cockpit package in case the package is not already installed.

dnf install -y cockpit

You can install
add-on packages to manage other tasks using Cockpit.

Enable the Cockpit service.

systemctl enable --now cockpit.socket

Firewall

Add a firewall rule to allow Cockpit to manage the remote machines as well as to enable us to access the Cockpit dashboard from external machines.

firewall-cmd --permanent --add-service=cockpit

firewall-cmd --reload

Access Cockpit

The Cockpit console should now be accessible if you visit the below URL using the
browser.

https://ip.add.re.ss:9090

Click proceed if you get a warning message for a self-signed certificate and proceed to access the Cockpit console.

Self-Signed Certificate Warning

Log in to Cockpit with your local system user account. In my case, it is root.

Login to Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830606 586 How To Install Cockpit on CentOS 8 RHEL 8
Login to Cockpit
Optionally, click on Reuse my password for privileged tasks in case you are trying to log in as a regular user and have sudo privileges to perform administrative tasks.
Regular User Login How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830606 196 How To Install Cockpit on CentOS 8 RHEL 8
Regular User Login

Working With Cockpit

Once you have logged in into the Cockpit console, you will get the System page where you can see an overview of your system. Here, you can change the hostname, time, restart or shut down the system and view the system usage graphs.

Cockpit Dashboard How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830606 919 How To Install Cockpit on CentOS 8 RHEL 8
Cockpit Dashboard

You can view logs from the console to troubleshoot your system issues. You have an option to filter the logs based on duration and severity.

View System Logs with Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830606 360 How To Install Cockpit on CentOS 8 RHEL 8
View System Logs with Cockpit

You can manage disks, partitions, and LVM by going to Storage (dnf install -y cockpit-storaged). Also, you can check disk read and write performance and storage logs.

Manage Storage with Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830606 750 How To Install Cockpit on CentOS 8 RHEL 8
Manage Storage with Cockpit

Another important section is Networking. Here, you can change the system IP address, create network bonding, teaming, network bridge and add VLAN. In addition to that, you can manage the firewall and view the network graphs and logs.

Manage Networking with Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830606 745 How To Install Cockpit on CentOS 8 RHEL 8
Manage Networking with Cockpit

You can manage Podman containers by going yo the
Podman Containers (dnf install -y cockpit-podman) page. Here, you can run, stop, delete and commit containers.

Manage Podman Containers with Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830606 300 How To Install Cockpit on CentOS 8 RHEL 8
Manage Podman Containers with Cockpit

Manage the Kernel virtual machines (dnf install -y cockpit-machines) by going to Virtual Machines.

Manage Virtual Machines with Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830606 887 How To Install Cockpit on CentOS 8 RHEL 8
Manage Virtual Machines with Cockpit

You can create and manage the system users by going to Accounts.

User Management with Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830606 80 How To Install Cockpit on CentOS 8 RHEL 8
User Management with Cockpit

You can see the details of system services by clicking on Services. Here, you can start, stop, restart, enable or disable the service by clicking on a particular service.

Manage System Service with Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830607 89 How To Install Cockpit on CentOS 8 RHEL 8
Manage System Service with Cockpit

You have an option to generate a sosreport and share it with the support team by going to Diagnostic Reports using the Cockpit.

Generate System Diagnostic Report with Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830607 781 How To Install Cockpit on CentOS 8 RHEL 8
Generate System Diagnostic Report with Cockpit

Manage kernel crash dump by going to Kernel Dump. You can also test kernel crash dump configuration.

Manage Kernel Crash Dump How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830607 93 How To Install Cockpit on CentOS 8 RHEL 8
Manage Kernel Crash Dump

You can seamlessly update the system packages using Software Updates.

System Updates with Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830607 694 How To Install Cockpit on CentOS 8 RHEL 8
System Updates with Cockpit

You can also take the terminal of the server by clicking on the Terminal.

Web Terminal using Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830607 658 How To Install Cockpit on CentOS 8 RHEL 8
Web Terminal using Cockpit

Manage Multiple Servers with Cockpit

To add a remote server with Cockpit, click on Dashboard (dnf install -y cockpit-dashboard && systemctl restart cockpit.socket). Then, click on the Plus sign icon to add it.

Add Remote Machines to Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830607 5 How To Install Cockpit on CentOS 8 RHEL 8
Add Remote Machines to Cockpit

The remote machine you are trying to add should already have the Cockpit package installed, and the service is started.

Click connect when Cockpit reports Unknown Host Key.

Unknown Host Key How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830607 799 How To Install Cockpit on CentOS 8 RHEL 8
Unknown Host Key

If the user on the remote Cockpit machine is different from the currently logged in user, manually enter the username and password of the remote machine to connect.

Log in to Remote Machine How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830607 375 How To Install Cockpit on CentOS 8 RHEL 8
Log in to Remote Machine

You should now see the local and remote machine(s) in the Cockpit dashboard.

Remote Machine Connected with Cockpit How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830607 441 How To Install Cockpit on CentOS 8 RHEL 8
Remote Machine Connected with Cockpit

Overview of the remote system:

Detailed Overview of Remote Machine How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 How To Install Cockpit on CentOS 8 / RHEL 8 | Holhol24 1605830608 809 How To Install Cockpit on CentOS 8 RHEL 8
Detailed Overview of Remote Machine

Conclusion

That’s All. I hope you have learned how to install Cockpit on
CentOS 8 /
RHEL 8 and use it for system administration activities.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More