Install and Configure Cockpit

This section provides a tutorial example on how to install and configure Cockpit as a system administrator Web tool on CentOS 8 systems.

If you want to use Cockpit to monitor and manage your Linux systems, you can follow what I did on my CentOS 8 computer to install and configure Cockpit.

1. Install Cockpit with the "dnf install" command. If Cockpit is already installed, it will upgrade to its latest version.

herong$ sudo dnf install cockpit

Package cockpit-196.3-1.el8.x86_64 is already installed.



2. Enable and start the Cockpit service, which uses a default self-signed server certificate.

herong$ sudo systemctl enable cockpit

herong$ sudo systemctl start cockpit

herong$ sudo systemctl status cockpit
* cockpit.service - Cockpit Web Service
   Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; ...
   Active: active (running) since Tue ...
     Docs: man:cockpit-ws(8)
  Process: 7282 ExecStartPre=/usr/sbin/remotectl certificate --ensure ...
 Main PID: 7285 (cockpit-ws)
    Tasks: 2 (limit: 26213)
   Memory: 1.5M
   CGroup: /system.slice/cockpit.service
           |-7285 /usr/libexec/cockpit-ws

localhost.localdomain systemd[1]: Starting Cockpit Web Service...
localhost.localdomain systemd[1]: Started Cockpit Web Service.
localhost.localdomain cockpit-ws[7285]: Using certificate: \

3. Make sure that the related Cockpit Socket service is also enabled and started.

herong$ sudo systemctl enable cockpit.socket

herong$ sudo systemctl start cockpit.socket

herong$ sudo systemctl status cockpit.socket
* cockpit.socket - Cockpit Web Service Socket
   Loaded: loaded (/usr/lib/systemd/system/cockpit.socket; enabled; ...
   Active: active (listening) since Tue ...
     Docs: man:cockpit-ws(8)
   Listen: [::]:9090 (Stream)
    Tasks: 0 (limit: 26213)
   Memory: 764.0K
   CGroup: /system.slice/cockpit.socket

localhost.localdomain systemd[1]: Starting Cockpit Web Service Socket.
localhost.localdomain systemd[1]: Listening on Cockpit Web Service Socket.

4. Make sure that the firewall is open for the Cockpit service port, 9090.

herong$ sudo firewall-cmd --zone=public --add-service=cockpit


5. Access Cockpit portal with a Web browser with a URL like this: "". You should see a login screen.

6. Login with your user name (with administrator privilege) and password. You should see the Cockpit functionalities displayed in the left menu.

Table of Contents

 About This Book

 Introduction to Linux Systems

Cockpit - Web Portal for Administrator

 What Is Cockpit

Install and Configure Cockpit

 "Web console" Login Welcome Message

 Process Management

 Files and Directories

 Users and Groups

 File Systems

 Block Devices and Partitions

 LVM (Logical Volume Manager)

 Installing CentOS

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

 Internet Networking Tools

 SSH Protocol and ssh/scp Commands

 Software Package Manager on CentOS - DNF and YUM

 vsftpd - Very Secure FTP Daemon

 LDAP (Lightweight Directory Access Protocol)

 Administrative Tasks


 Full Version in PDF/EPUB