{"id":4376,"date":"2019-10-06T22:24:18","date_gmt":"2019-10-06T19:24:18","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4376"},"modified":"2024-03-12T22:26:10","modified_gmt":"2024-03-12T19:26:10","slug":"how-to-enable-cockpit-on-centos-8","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-enable-cockpit-on-centos-8\/","title":{"rendered":"How to Enable Cockpit on CentOS 8"},"content":{"rendered":"\n

Cockpit<\/a> is a web accessible interactive admin interface for Linux machines. In this guide, we are going to learn how to enable cockpit on CentOS 8 to enable you administer your CentOS 8 system administration tasks from the browser.<\/p>\n\n\n\n

Enabling Cockpit on CentOS 8<\/h2>\n\n\n\n

Install Cockpit on CentOS 8<\/h3>\n\n\n\n

CentOS 8 comes with Cockpit pre-installed. However, you would simply execute the command below to install it.<\/p>\n\n\n\n

dnf install cockpit<\/code><\/pre>\n\n\n\n

Running Cockpit on CentOS 8<\/h3>\n\n\n\n

Cockpit web service is managed by systemd. Hence, it can be started as follows;<\/p>\n\n\n\n

systemctl start cockpit.socket<\/code><\/pre>\n\n\n\n

To enable it to run on system boot;<\/p>\n\n\n\n

systemctl enable cockpit.socket<\/code><\/pre>\n\n\n\n

The start and enable commands above can be executed as one command by running;<\/p>\n\n\n\n

systemctl enable --now cockpit.socket<\/code><\/pre>\n\n\n\n

To check the status of the Cockpit web service;<\/p>\n\n\n\n

systemctl status cockpit.socket<\/code><\/pre>\n\n\n\n
\u25cf cockpit.socket - Cockpit Web Service Socket\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/cockpit.socket; enabled; vendor preset: disabled)\n   Active: active (listening) since Sun 2019-10-06 13:57:36 EDT; 1min 39s ago\n     Docs: man:cockpit-ws(8)\n   Listen: [::]:9090 (Stream)\n    Tasks: 0 (limit: 11512)\n   Memory: 392.0K\n   CGroup: \/system.slice\/cockpit.socket\n\nOct 06 13:57:36 localhost.localdomain systemd[1]: Starting Cockpit Web Service Socket.\nOct 06 13:57:36 localhost.localdomain systemd[1]: Listening on Cockpit Web Service Socket.<\/code><\/pre>\n\n\n\n

Allow Cockpit on Firewall<\/h3>\n\n\n\n

Cockpit web service usually listens on TCP port 9090.<\/p>\n\n\n\n

To allow remote access to Cockpit, open this port on firewalld.<\/p>\n\n\n\n

firewall-cmd --get-active-zones<\/code><\/pre>\n\n\n\n
firewall-cmd --add-port=9090\/tcp --zone=MY_ACTIVE_ZONE --permanent<\/code><\/pre>\n\n\n\n

Replace MY_ACTIVE_ZONE<\/strong> accordingly.<\/p>\n\n\n\n

firewall-cmd --reload<\/code><\/pre>\n\n\n\n

Accessing CentOS 8 Cockpit from Browser<\/h3>\n\n\n\n

By default, Cockpit includes a self-signed SSL\/TLS certificate and can be access via the browser using the address, https:\/\/CentOS-Server-IP:9090<\/code><\/strong>.<\/p>\n\n\n\n

By default Cockpit is configured to allow logins using username and password of any local account on the system. If you are logging as non-root user with sudo rights, ensure that you check, Reuse my password for privileged tasks<\/code><\/strong>.<\/p>\n\n\n\n

\"How<\/a><\/figure>\n\n\n\n

When logged in, the default dashboard looks like;<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Running System Administrative Tasks from Cockpit<\/h3>\n\n\n\n

To run system administrative tasks from Cockpit, ensure you login as a user with privileged rights.<\/p>\n\n\n\n

Take for example, you need to create user account, you can either launch the terminal and execute the user account creation commands or simply click on the Accounts<\/strong> menu on the left panel and Create New Account. (Be sure to check, Reuse my password for privileged tasks<\/strong> when logging in).<\/p>\n\n\n\n

\"Cockpit<\/a><\/figure>\n\n\n\n

Enter the new user details and click create to create it.<\/p>\n\n\n\n

\"creating<\/a><\/figure>\n\n\n\n

You can later view user details on the same accounts menu.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

If you need to use the terminal for this task, simply launch terminal by clicking Terminal<\/strong> on the left panel.<\/p>\n\n\n\n

\"Cockpit<\/a><\/figure>\n\n\n\n

Well, as you can see, it is very easy to use Cockpit to administer your CentOS tasks. Explore the full capability of Cockpit.<\/p>\n\n\n\n

Read more on Cockpit User Guide<\/a>.<\/p>\n\n\n\n

Related Tutorials<\/h4>\n\n\n\n

Install Webmin on CentOS 8<\/a><\/p>\n\n\n\n

Install and Setup Chrome Remote Desktop on Ubuntu 18.04<\/a><\/p>\n\n\n\n

How to Setup Guacamole Web-based Remote Desktop Access Tool on Ubuntu 18.04<\/a><\/p>\n\n\n\n

Install and Configure VNC Server on CentOS 8<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

Cockpit is a web accessible interactive admin interface for Linux machines. In this guide, we are going to learn how to enable cockpit on CentOS<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,926,376],"tags":[1142,927],"class_list":["post-4376","post","type-post","status-publish","format-standard","hentry","category-howtos","category-cockpit","category-system-manager","tag-centos-8","tag-cockpit","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4376"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=4376"}],"version-history":[{"count":2,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4376\/revisions"}],"predecessor-version":[{"id":21233,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4376\/revisions\/21233"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=4376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=4376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=4376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}