开启命令如下
#当前为非 root 用户 lenovo
[lenovo@localhost ~]$ systemctl enable --now cockpit.socket
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files ====
Authentication is required to manage system service or unit files.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ====
Created symlink /etc/systemd/system/sockets.target.wants/cockpit.socket → /usr/l ib/systemd/system/cockpit.socket.
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ====
Authentication is required to reload the systemd state.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ====
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
启动“cockpit.socket”需要认证。
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ====
[lenovo@localhost ~]$
非 root 用户需要输入认证。开启服务成功默认打开9090端口。
[wenjun@localhost ~]$ netstat -ntlp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp6 0 0 :::111 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 ::1:631 :::* LISTEN -
tcp6 0 0 :::9090 :::* LISTEN -
[wenjun@localhost ~]$
本机 IP 为 192.168.110.111 ,浏览器地址输入 https://192.168.110.111:9090。打开如下界面
输入用户名密码即可进入 web 控制台界面。
终端选项卡可输入各类命令。例如 uname -a