We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – Manage Rocky Linux 8 Server using Cockpit Web Console

Learn how to – Manage Rocky Linux 8 Server using Cockpit Web Console.

A Linux system administrator’s main task is to install, upgrade and monitor the system’s hardware and software while maintaining all the essential services and applications. In most cases, all the above functions are done by administering commands via the command line. Linux has become a must-know for many system administrators especially with a larger environment to handle. Also, the command line is significantly faster than running a server with GUI. For this reason, many organizations have migrated from Windows where everything is managed with a point-and-click GUI. Fortunately, in recent years, developers have switched their trend towards developing independent GUI-based tools, each designed to manage some particular system area and perform associated tasks.

There are many GUI tools that make your sysadmin task easier such as, MySQL Workbench, Webmin, phpMyAdmin, YaST, Apache Directory, CUPS, Shorewall, cPanel, Ajenti, Cockpit e.t.c

In this guide, we will discuss how to Manage Rocky Linux 8 Server using Cockpit Web Console. Cockpit was created by RedHat with the main purpose of making server administration easier. It is a GUI-web-based tool that helps you perform a variety of tasks such as:

  • Managing and monitoring system services
  • multiple server monitoring
  • storage administration
  • Managing system subscriptions
  • Configuring network interfaces and firewall
  • Managing user accounts
  • journal inspection
  • Reviewing system logs
  • Creating diagnostic reports
  • Configuring SELinux
  • Updating software

With Cockpit, the same system APIs are utilized as those in the terminal, and tasks are performed on the terminal are quickly reflected on the web console.

Managing Rocky Linux 8 Server using Cockpit Web Console is done in the following steps:

Step 1. Installing Cockpit Web Console

By default, Cockpit is not installed on your Rocky Linux 8 system. So we need to get it installed on Rocky Linux 8 using the command:

sudo yum install cockpit

Dependency Tree:

....
Transaction Summary
================================================================================
Install  34 Packages

Total download size: 14 M
Installed size: 35 M
Is this ok [y/N]: y

With Cockpit installed, we need to start and enable the cockpit.socket service to connect the system through the web console.

sudo systemctl start cockpit.socket
sudo systemctl enable --now cockpit.socket

Check the status of the service:

$ systemctl status cockpit.socket
 cockpit.socket - Cockpit Web Service Socket
   Loaded: loaded (/usr/lib/systemd/system/cockpit.socket; enabled; vendor preset: disabled)
   Active: active (listening) since Sat 2021-09-04 10:00:58 EDT; 21s ago
     Docs: man:cockpit-ws(8)
   Listen: [::]:9090 (Stream)
    Tasks: 0 (limit: 9688)
   Memory: 1.0M
   CGroup: /system.slice/cockpit.socket

Sep 04 10:00:58 rockylinux8.linuxvmimages.local systemd[1]: Starting Cockpit Web Service Socket.
Sep 04 10:00:58 rockylinux8.linuxvmimages.local systemd[1]: Listening on Cockpit Web Service Socket.

Check the port on which the service is running

$ sudo ps auxf|grep cockpit
rockyli+    8166  0.0  0.0  12112  1100 pts/0    S+   10:01   0:00              _ grep --color=auto cockpit

From the output, the service is running on port 9090. So we need to allow this port through the firewall.

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

Step 2: Logging in to the Cockpit Web Console

First, log in to the cockpit web console using the system user account credentials. This is necessary because Cockpit uses the PAM stack authentication method found in /etc/pam.d/cockpit. This enables you to log in with the username and password of any local account on the system.

Please use one of the following browsers to open the web console.

  1. Google Chrome 57 and later
  2. Microsoft Edge 16 and later
  3. Mozilla Firefox 52 and later

User the URL https://IP_Address:9090 or https://HOSTNAME:9090 to access the web console. In case you are using a self-signed certificate, you will get a warning on the browser. You need to verify it and proceed. Although this security warning can be avoided by installing a certificate signed by a Certificate Authority (CA).

Now you should see the below page:

If you sign in with an account with sudo privileges, you will be able to perform administrative tasks such as installing software, configuring your system e.t.c

On successful login, you will see this Cockpit web console

Step 3: Manage Server using Cockpit Web Console

Now we are set to manage Rocky Linux 8 server using the Cockpit web console. There are many tasks you can perform with Cockpit as illustrated below.

Restarting Server using Cockpit

To restart your Rocky Linux 8 system, navigate to Overview and click on the restart button on your far right as shown.

You can delay or restart immediately using the Delay drop-down as shown.

With the desired option selected, click restart.

Shutting down Server using Cockpit

Similarly, to shut down your system, navigate to the Overview tab, and in the restart drop-down list select shutdown as shown.

Here you can also select an optional delay as we did while restarting.

Configuring time settings using Cockpit.

You can use a Network Time Protocol (NTP) server to set a time zone and synchronize the system by navigating to the Overview tab and click on the system time as shown

In the Change System Time window, change the time zone. Set the time in the drop-down menu and select one of the following options: Manually, Automatically using NTP server and Automatically using specific NTP servers.

Once selected, click Change to apply the settings.

Manage VMs on Rocky Linux 8 using Cockpit.

This is done by locating the Virtual Machines option in the left panel.

On this page, you can create a VM by clicking on Create new VM.

Fill in the required details you need to have the ISO file to mount it in the Installation Source segment.

Finish VM creation by clicking on Create. Once done, your VM will be created and listed.

View System logs on Rocky Linux 8 using Cockpit

This is done by clicking on logs in the left panel.

Configure Network and Firewall on Rocky Linux 8 using Cockpit.

In the left panel, select network as shown.

While on this page, there is a variety of actions you can perform such as editing firewall rules, add networks(bridge, bond, VLAN,team).

Manage system services on Rocky Linux 8 using Cockpit.

Click on services on the left panel as shown.

On this page, you can view the status of services on your system and manage them appropriately.

Configure SELinux on Rocky Linux 8 using Cockpit.

SELinux can be accessed and configured using Cockpit by clicking on it in the left panel as shown.

While on this page, you can see the mode of SELinux. For me, it is in the Enforcing mode. You can activate and deactivate it accordingly. You can also see allowed applications.

Access the Terminal on Rocky Linux 8 using Cockpit.

Cockpit also allows you to access the terminal and issue commands to your system. To access it, launch the terminal using the panel on your left as shown.

That is it! We have come to the end of this guide on how to manage Rocky Linux 8 Server using Cockpit Web Console. This helps system admins to perform their operations easily because Cockpit has a simple and user-friendly web UI that can be accessed on laptops, mobile phones, and tablets. I hope this guide was of importance to you.

See more:

Cart

Your Cart is Empty

Back To Shop