Unlock Easy Server Management on CentOS 8 with Cockpit: Step‑by‑Step Guide
This tutorial introduces Cockpit, the web‑based visual management tool bundled with CentOS 8, and provides detailed installation, repository configuration, service activation, and feature walkthroughs to help administrators manage users, firewalls, storage, containers, and updates without using the command line.
Overview
Cockpit is a web‑based management console included in CentOS 8. It provides graphical interfaces for tasks such as user management, firewall configuration, storage, network monitoring, and container management.
YUM repository configuration for CentOS 8.5.2111
Default repositories may be unavailable. Replace them with the Alibaba Cloud mirror.
# Backup original BaseOS repo
mv /etc/yum.repos.d/CentOS-Linux-BaseOS.repo /etc/yum.repos.d/CentOS-Linux-BaseOS.repo.bak
# Download mirror repo file
wget -O /etc/yum.repos.d/CentOS-Linux-BaseOS.repo http://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
# Edit /etc/yum.repos.d/CentOS-Linux-AppStream.repo to include:
[appstream]
name=CentOS-8.5.2111 - AppStream - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/AppStream/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-OfficialRefresh the cache:
sudo yum clean all
sudo yum makecacheInstalling and starting Cockpit
On CentOS 8 Cockpit is already installed. Enable the socket and start the service:
systemctl enable --now cockpit.socket
systemctl start cockpitOn CentOS 7 install the package and open the firewall:
yum install cockpit
firewall-cmd --permanent --zone=public --add-service=cockpit
firewall-cmd --reloadAccess the UI with a web browser at http://SERVER_IP:9090/ using any local Linux account (e.g., root).
Key Cockpit modules
Dashboard – displays CPU, memory, system information and hardware details.
Usage – real‑time graphs of CPU, memory, disk and network similar to top.
Storage – view file‑system layout, manage LVM volume groups and mount NFS shares.
Network – shows network interfaces and firewall status; allows enabling/disabling services.
Firewall – add or remove ports and services directly.
Podman – pull images and run containers; e.g., podman pull nginx and podman run -d -p 80:80 nginx.
Accounts – create, modify or delete Linux users without using useradd.
Software Updates – view available package updates and apply them from the UI.
Terminal – embedded shell for command‑line operations.
SELinux – view and toggle SELinux enforcement mode.
Reference
Official documentation: https://cockpit-project.org/documentation.html
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
