Cockpit is a web-based server manager that provides a simple and user-friendly interface for managing various aspects of a Linux server, including system monitoring, user account management, and system configuration. It is compatible with various Linux distributions, including CentOS, Fedora, and Ubuntu.
If you are a system administrator, you may want to use Cockpit to manage your Linux server. This tutorial will walk you through the step-by-step process of installing Cockpit on a CentOS Linux server.
Step 1: Install Cockpit:
The first step is to install Cockpit on your CentOS server. You can do this by running the following command:
sudo yum install cockpit
This will install Cockpit and its dependencies on your system.
Step 2: Enable Cockpit Service:
Once you have installed Cockpit, you need to enable its service to run at system startup. You can do this by running the following command:
sudo systemctl enable --now cockpit.socket
This will enable the Cockpit service and start it immediately.
Step 3: Allow Cockpit Through Firewall:
By default, Cockpit uses TCP port 9090 to communicate with your web browser. If you have a firewall enabled on your system, you need to allow incoming traffic on this port. You can do this by running the following command:
sudo firewall-cmd --permanent --add-service=cockpit
This will allow incoming traffic on port 9090 for the Cockpit service.
Step 4: Access Cockpit Web Interface:
Now that you have installed and enabled Cockpit and allowed incoming traffic on the required port, you can access the Cockpit web interface using your web browser. Open your browser and enter the following URL in the address bar:
Replace “your-server-ip” with the IP address of your CentOS server.
You should now see the Cockpit login page. Enter your system credentials to log in and start managing your server using the Cockpit interface.
- yum – package manager for CentOS and other Red Hat-based systems.
- systemctl – command to control the systemd system and service manager.
- firewall-cmd – command-line tool for managing firewall rules on CentOS and other Red Hat-based systems.
In this guide, we have walked through the step-by-step process of installing and configuring Cockpit on a CentOS Linux server. By following these steps, you should now have Cockpit installed and running on your system, allowing you to easily manage various aspects of your server using the web interface. If you encounter any issues or have suggestions for improvements, feel free to leave a comment below.