Cockpit is a web-based server management tool that can be used for CentOS and RHEL systems. Recently released CentOS 8 and RHEL 8, in which cockpit is the default server management tool. Its packages are available in the default CentOS 8 and RHEL 8 repositories. Cockpit is a useful web-based GUI tool through which system administrators can monitor and manage Linux servers. It can also be used to manage networks and storage in servers, containers, and virtual machines, as well as to check system and application logs.
In this article, we will demonstrate how to install and set up Cockpit in CentOS 8 and RHEL 8.
Install and set up Cockpit on CentOS 8/RHEL 8
Log in to your CentOS 8/RHEL 8, open a terminal and execute the following dnf command:
[ root@linuxtechi ~]# dnf install cockpit -y
Run the following command to enable and start the cockpit service:
[ root@linuxtechi ~]# systemctl start cockpit.socket
[ root@linuxtechi ~]# systemctl enable cockpit.socket
Use the following command to allow the Cockpit port in the system firewall:
[ root@linuxtechi ~]# firewall-cmd --permanent --add-service=cockpit
[ root@linuxtechi ~]# firewall-cmd --reload
To verify that the cockpit service is up and running, execute the following command:
[ root@linuxtechi ~]# systemctl status cockpit.socket
[ root@linuxtechi ~]# ss -tunlp | grep cockpit
[ root@linuxtechi ~]# ps auxf|grep cockpit
cockpit-status-centos8-rhel8
cockpit-status-centos8-rhel8
Access Cockpit on CentOS 8/RHEL 8
As we can see in the output of the above command, cockpit is listening on the tcp 9090 port, open your web browser and enter the url: https://<Your-CentOS8/RHEL8-System-IP> :9090.
Cockpit login page in RHEL 8:
Use a username with administrator rights, or we can log in with the password of the root user. If you want to assign administrator rights to any local user, execute the following command:
[ root@linuxtechi ~]# usermod -G wheel pkumar
Here pkumar is my local user,
After entering the user password, select "Reuse my password for privileged tasks", and then click "Log In", then we see the following page:
On the left sidebar, we can see what can be monitored and configured through the cockpit GUI,
Suppose you want to check if there are any available updates in CentOS 8/RHEL 8, click "System Updates":
To install all updates, click "Install All Updates":
If you want to modify the network and add Bond interfaces and bridges, click "Networking":
As you can see above, we have options to create Bond interfaces, bridges, and VLAN tagged interfaces.
Suppose we want to create a br0 network bridge and add the enp0s3 port to it, click "Add Bridge":
Specify the bridge name as br0 and the port as enp0s3, and click "Apply".
On the next page, we will see that the bridge is active and has obtained the same IP as the enp0s3 interface:
If you want to check the system log, click "Logs", we can view the log according to the severity:
to sum up
The above is the method of installing and using Cockpit on CentOS 8/RHEL 8 introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message. The editor will reply to you in time. Thank you very much for your support to the ZaLou.Cn website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!
Recommended Posts