Monitor And Manage Linux From Web Console Using Cockpit Tool

In this post we will learn how to install Cockpit tool in Linux machine. Cockpit is an opensource web base tool to manage Linux server and its configuration with GUI. You can check system status and monitor services and configuration of your Linux server. This gives you complete ease to configure services , network interfaces, users. And you can find the logs , diagnostic reports and kernel dump . There are extra plugins like cockpit session record which will help you to record shell session to diagnose the issue.

Steps To Install Cockpit Tool

1 : First of all make your system up to date and then install Cockpit tool with below command.

For RPM/Redhat Base System

yum -y update

yum -y cockpit

For Ubuntu/Debian Base System

sudo apt update

sudo apt install cockpit

2 : Then start the Cockpit service and socket and enable it for boot time start with below commands

systemctl start cockpit.socket

systemctl start cockpit.service

systemctl enable cockpit.socket

systemctl enable cockpit.service

3 : Run below command to check the status of the service if it is running or not.

systemctl status cockpit

If service is running and active you can proceed further

4 : Now add this service in your firewall rules to allow access through browser

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

5 : Cockpit service runs on port number 9090 by default. You can access it on your local machine at port 9090

- But if you are using Virtual machine you have to enable port forwarding with NAT configuration so that you can access the Web UI from host machine.

- Run below command to add port 9090 in your firewall rule in which you have install cockpit

firewall-cmd --permanent --add-port=9090/tcp

6 : For Virtual Box, NAT configuration and port forwarding >> select your Linux Virtual Machine >> select Properties >> select Network >> select Advance >> select Port Forwarding >> Add a new rule as shown below picture for cockpit to forward port 9090 => 9091 for host system

7 : If cockpit configured and access from same machine, open browser and enter hostname/ip address of that machine with the port number 9090 in address bar, e.g localhost:9090

If using virtual machine with port forwarding rule, enter the loopback address with port number 9091 from host machine, e.g 127.0.0.1:9091

8 : Enter the user id and password for any user account on cockpit landing page

9 : Thats all , Check your system hardware resources like CPU and RAM utilization, check services, logs, user accounts etc

Post a Comment

0 Comments