Ubuntu 20.04 Essentials
上QQ阅读APP看书,第一时间看更新

8.2 Installing and Enabling Cockpit

Cockpit is generally not installed on Ubuntu by default, but can be set up and enabled in a few simple steps. The first step is to install the Cockpit package as follows:

# apt install cockpit

Next, the Cockpit socket service needs to be enabled:

# systemctl enable --now cockpit.socket

Finally, the necessary ports need to be opened on the firewall to allow remote browser connections to reach Cockpit if a firewall is enabled on your system (for details on firewalls, refer to the chapter entitled “Ubuntu Firewall Basics”).

If ufw is enabled:

# ufw allow 9090

If firewalld is enabled:

# firewall-cmd --add-service=cockpit --permanent

# firewall-cmd --reload