How To Install Cockpit on CentOS 7

Cockpit is a free and open source program for Linux server management. It is very lightweight and has a beautiful, easy to use web interface. It allows system administrators to easily perform tasks such as starting Docker containers, storage administration, and network configuration. Cockpit is released under the LGPL v2.1+, and it is available for Debian, Redhat, CentOS, Fedora, Atomic, Arch Linux, and Ubuntu.
In this tutorial you will learn how to install the latest version of Cockpit on CentOS 7.

ban3

Install Cockpit on CentOS 7.x

# yum install -y cockpit cockpit-networkmanager cockpit-dashboard cockpit-storaged cockpit-packagekit

You can additionally install below packages to manage other tasks using Cockpit.

Package NamePurpose
cockpit-dockerManaging Docker Containers
cockpit-kubernetesVisualizing and Configuring Kubernetes Cluster
cockpit-machinesManage KVM Virtual Machines
cockpit-sosreportCreate diagnostic report with the sosreport tool
cockpit-selinuxTroubleshoot SELinux Issues
cockpit-kdumpConfigure Kernel Crash Dumps
cockpit-subscriptionsManage System subscription
cockpit-machines-ovirtManage oVirt Virtual Machines
cockpit-pcpReading PCP metrics and Loading PCP archives

Enable the Cockpit service

To start Cockpit automatically on every reboot, run:

# sudo systemctl enable --now cockpit.socket

Allowing Firewall

After we have started our cockpit server and enable it to start in every boot, we’ll now go for configuring firewall. As we have firewall programs running in our server, we’ll need to allow ports in order to make cockpit accessible outside of the server.

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

Accessing Cockpit Web Interface

Once you start the Cockpit service, you access the Cockpit console by going to below URL using the browser.

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

You would need to add a Security Exception in the browser to access the Cockpit for the first time. Log in with your local user account. In my case; it is “root”.

cock

Once you have logged in into Cockpit, it will take you to the System page where you can see a complete overview of the system.

ban2
Cockpit

That’s it. From here, you can do administrative tasks such as adding/deleting users, starting/stopping services, configuring network and so on.

Leave a Reply

Your email address will not be published. Required fields are marked *