The cart is empty

Cockpit is a modern web interface that allows administrators to easily manage servers. This tool is particularly useful for new administrators and those who prefer a graphical user interface (GUI) over the command line. Cockpit is designed to be intuitive and user-friendly while providing powerful tools for common system administration tasks. In this article, we will focus on installing and using Cockpit for CentOS 7 management via a web interface.

Installing Cockpit

Installing Cockpit on CentOS 7 is straightforward. The first step is enabling the EPEL (Extra Packages for Enterprise Linux) repository since Cockpit is not part of CentOS's standard repositories. This can be achieved by running the following command:

sudo yum install epel-release

Once the EPEL repository is enabled successfully, Cockpit can be installed using the command:

sudo yum install cockpit

After the installation completes, Cockpit needs to be enabled and started using systemd:

sudo systemctl enable --now cockpit.socket

This step ensures that Cockpit will be started at system boot.

Accessing Cockpit via Web Interface

After installing and starting Cockpit, it can be accessed from a web browser. By default, Cockpit listens on port 9090. To access the Cockpit interface, open a web browser and enter the server's address as follows:

https://your-server:9090

 

It is important to use the HTTPS protocol for secure communication. Upon first access to the web interface, the browser may display a warning about an untrusted SSL certificate. This warning can be safely bypassed or a custom SSL certificate can be set up for Cockpit.

Key Features of Cockpit

Cockpit provides several useful features for system management:

  • System Overview: Displays basic system information, including CPU, memory, network interfaces, and disk status.
  • Service Management: Allows management of system services, including starting, stopping, and restarting services.
  • Logs: Provides an overview of system logs with options to filter by severity or time range.
  • Terminal: Access to the command line directly from the web interface, useful for advanced system management.
  • User Management: Enables adding, removing, and managing system users.

Securing Cockpit Security should be a top priority when using Cockpit. This includes setting strong passwords for users, using a firewall to restrict access to port 9090 to only trusted network ranges, and considering the use of a VPN for remote access. Additionally, setting up SSL/TLS certificates is recommended to secure communication between the web browser and the server. For production environments, CA-signed certificates should be used, although self-signed certificates can be created for testing purposes or internal use.

Integration with Other Tools

Cockpit can be integrated with various other tools and services for enhanced system management. For example:

  • Podman: Container management directly from the Cockpit web interface.
  • SELinux: Display and management of SELinux policies and auditing.
  • NFS and Samba: Configuration and management of network storage via NFS or Samba shares.
  • iSCSI: Configuration of iSCSI targets and initiators for block storage sharing.

These and other modules can be added to Cockpit as needed, increasing flexibility and expanding management capabilities.

Cockpit offers an efficient solution for CentOS 7 system management via a web interface. Its simplicity, coupled with a rich set of features, makes Cockpit an ideal choice for administrators seeking an easily usable yet powerful tool for managing their servers. The installation and configuration of Cockpit are quick and straightforward, allowing for a rapid start to effective system management. With expanding support for various modules and integrations, Cockpit provides a flexible platform that can adapt to many different system management needs.