How to Install Cockpit on Linux CentOS 7?
The cockpit is a free, open-source Linux Server Management Tool which provides you the facility to control your server using the mouse on the web-interface. The cockpit can be used to perform any server related task such as start containers, storage administration, and network configuration and much more. It has a very beautiful user interface along with its light-weight application.
Fedora Server comes with Cockpit pre-installed but in CentOS we have to install it separately. In this article, we will discuss the ways in which we can install Cockpit in CentOS 7.
Installing Cockpit on CentOS 7:
Cockpit is already included in CentOS 7.x official base repository, so we can install directly from ‘yum‘ command.
- Open your terminal app in CentOS
- Download and install cockpit using yum command.
- Enable the cockpit.
- Open the firewall for cockpit and reloading the firewall.
- Logging In Cockpit Admin Panel.
Step-wise implementation of installations:
Step 1: Open your Terminal
You can launch the terminal app using ‘ctrl+shift+T’ or from application menu.
Step 2: Download and install Cockpit
Use the command below to download and install the cockpit.
sudo yum install cockpit
We will need admin rights in order to install new applications in our system, that’s why we are using sudo command. You may need to enter your root password because of security reasons.
It may ask you to confirm again whether you are sure to install cockpit. In that case, you just need to type ‘y’ and press enter for the confirmation.
Once the package is installed successfully without any errors, your screen will show a ‘Complete’ message, just like in the picture below. At this stage, you are ready to proceed with the next steps.
Step 3: Enable the Cockpit
Use the command below to enable the cockpit in our system.
sudo systemctl enable --now cockpit.socket
Step 4: Open the firewall for Cockpit
Use the command below to open the firewall for cockpit.
sudo firewall-cmd --permanent --zone=public --add-service=cockpit
We will need to reload the firewall in order to reflect the changes. This can be easily done by using the command below.
sudo firewall-cmd --reload
Step 5: Loading the Cockpit Web Interface
Now we are ready to use Cockpit. Open any browser of your preference and type the URL as: https://SERVER_IP:9090. Where server IP should be replaced with the actual IP of your server. You can also use https://localhost:9090 to login into Cockpit.
Use your admin username and root password which you use for CentOS to login into the admin panel. After the successful login, you will see the admin Console of Cockpit web interface.
In this way, you can easily install and use cockpit in CentOS 7.x or any other later version.