1. Install the cockpit package
On CentOS/RHEL 8 8 systems with non-minimal installations, the cockpit package is included by default. Otherwise, it would need to manually install Cockpit. In either case, running the following command ensures that the package is installed and is up to date.
# sudo dnf install cockpit
2. Enable and start the Cockpit service
To enable and start the Cockpit service, so that it will start accessing it immediately and so that it starts automatically after a reboot, run the following command:
# sudo systemctl enable --now cockpit.socket
The service starts and runs a web server that listens on TCP port 9090 by default. Check the status of the service by running:
# sudo systemctl status cockpit
3. Configure Firewall Rules (Optional)
If using a custom firewall profile, or an Oracle Cloud Infrastructure instance, open the firewall port for the web console (9090). To enable the firewall port for the cockpit service and reload the default firewall service on Oracle Linux, run:
# sudo firewall-cmd --add-service=cockpit --permanent # sudo firewall-cmd --reload
4. Logging into cockpit
In a web browser, go to the Cockpit web console using the hostname or IP address of the system at port 9090 using HTTPS. For example:
If logging in on the local host, please use:
If not using a signed security certificate, a warning that the connection is not private is displayed. To continue, add an exception for the site in the browser.
Log into Cockpit using a system user account. If the user account has sudo privileges, please run privileged tasks in the web console. To enable running sudo commands, check the Reuse my password for privileged tasks option. Click Log In. The Cockpit dashboard is displayed.