Ubuntu20.04.2安装Cockpit通过web管理系统

什么是Cockpit

Cockpit是一个简单易用的Web界面,让用户可以通过浏览器管理Linux服务器,支持系统监控、存储管理、网络配置和日志查看等,适合初学者和希望简化管理流程的系统管理员。

安装

使用 apt install cockpit开始安装

root@wireguard# apt install cockpit
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  cockpit-bridge cockpit-dashboard cockpit-networkmanager cockpit-packagekit cockpit-storaged cockpit-system cockpit-ws dns-root-data
 ......
Do you want to continue? [Y/n] y

启用&设为自动启动

root@wireguard# systemctl start cockpit
root@wireguard# systemctl status cockpit
● cockpit.service - Cockpit Web Service
     Loaded: loaded (/lib/systemd/system/cockpit.service; static; vendor preset: enabled)
     Active: active (running) since Thu 2024-08-01 14:25:55 CST; 4s ago
TriggeredBy: ● cockpit.socket
       Docs: man:cockpit-ws(8)
    Process: 171019 ExecStartPre=/usr/sbin/remotectl certificate --ensure --user=root --group=cockpit-ws --selinux-type= (code=exited,>
   Main PID: 171023 (cockpit-tls)
      Tasks: 1 (limit: 9432)
     Memory: 1.3M
     CGroup: /system.slice/cockpit.service
             └─171023 /usr/lib/cockpit/cockpit-tls

Aug 01 14:25:55 wireguard systemd[1]: Starting Cockpit Web Service...
Aug 01 14:25:55 wireguard remotectl[171019]: Generating temporary certificate using: sscg --quiet --lifetime 3650 --key-strength 2048 >
Aug 01 14:25:55 wireguard remotectl[171019]: Error generating temporary dummy cert using sscg, falling back to openssl
Aug 01 14:25:55 wireguard remotectl[171019]: Generating temporary certificate using: openssl req -x509 -days 36500 -newkey rsa:2048 -k>
Aug 01 14:25:55 wireguard systemd[1]: Started Cockpit Web Service.

设置开机自启

root@wireguard#  systemctl enable cockpit

至此你可以使用IP:9090端口在浏览器中打开web管理页面。Tips:登录使用的用户名和密码是操作系统的用户+密码

Wiki

https://cockpit-project.org/documentation.html

posted @ 2024-08-01 14:36  吴诺克  阅读(11)  评论(0编辑  收藏  举报
Copyright © 豆子林克 DOUZI.LINK  版权所有. 除特别申明外,本站原创内容版权遵循 CC-BY-NC-SA 协议规定