Linux Tutorials - Herong's Tutorial Examples - v5.41, by Herong Yang
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. Upgraded: cockpit-224.2-1.el8.x86_64 Complete!
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: Starting Cockpit Web Service... localhost.localdomain systemd: Started Cockpit Web Service. localhost.localdomain cockpit-ws: Using certificate: \ /etc/cockpit/ws-certs.d/0-self-signed.cert
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: Starting Cockpit Web Service Socket. localhost.localdomain systemd: 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 success
5. Access Cockpit portal with a Web browser with a URL like this: "https://192.168.1.100:9090". 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