目录
前言
在服务器运维过程中,经常会遇到多机器管理的情况,如果没有比较好的管理功能,管理起来就会非常麻烦,会面临各种各样的情况,比如登录密码搞错,或者进错服务器等。其实这种管理工具有不少,下面来记录下在Ubuntu系统上安装linux系统的web运维工具cockpit,并安装centos自带的容器管理工具podman和管理插件等。
一、准备工具
ubuntu 22.04系统
远程连接工具或显示器
二、安装步骤
1、更新系统到最新版本
sudo apt update
sudo apt upgrade
2、使用以下命令安装podman
sudo apt install podman
3、使用以下命令安装cockpit及相关插件
sudo apt install cockpit cockpit-podman cockpit-machines
三、启动服务
使用如下命令启动服务
sudo systemctl start cockpit
使用如下命令查看服务运行状态
sudo systemctl status cockpit
root@ubt2004and:~# systemctl status cockpit
● cockpit.service - Cockpit Web Service
Loaded: loaded (/lib/systemd/system/cockpit.service; static)
Active: active (running) since Tue 2022-10-25 16:38:06 CST; 1min 47s ago
TriggeredBy: ● cockpit.socket
Docs: man:cockpit-ws(8)
Process: 28524 ExecStartPre=/usr/lib/cockpit/cockpit-certificate-ensure --for-cockpit-tls (code=exited, status=0/SUCCESS)
Main PID: 28525 (cockpit-tls)
Tasks: 2 (limit: 19077)
Memory: 1.5M
CPU: 30.520s
CGroup: /system.slice/cockpit.service
└─28525 /usr/lib/cockpit/cockpit-tls
10月 25 16:38:07 ubt2004and cockpit-tls[28525]: cockpit-tls: gnutls_handshake failed: A TLS fatal alert has been received.
10月 25 16:38:07 ubt2004and cockpit-tls[28525]: cockpit-tls: gnutls_handshake failed: A TLS fatal alert has been received.
10月 25 16:38:07 ubt2004and cockpit-tls[28525]: cockpit-tls: gnutls_handshake failed: A TLS fatal alert has been received.
10月 25 16:38:07 ubt2004and cockpit-tls[28525]: cockpit-tls: gnutls_handshake failed: A TLS fatal alert has been received.
10月 25 16:38:07 ubt2004and cockpit-tls[28525]: cockpit-tls: gnutls_handshake failed: A TLS fatal alert has been received.
10月 25 16:38:07 ubt2004and cockpit-tls[28525]: cockpit-tls: gnutls_handshake failed: A TLS fatal alert has been received.
10月 25 16:38:07 ubt2004and cockpit-tls[28525]: cockpit-tls: gnutls_handshake failed: A TLS fatal alert has been received.
10月 25 16:38:07 ubt2004and cockpit-tls[28525]: cockpit-tls: gnutls_handshake failed: A TLS fatal alert has been received.
10月 25 16:38:07 ubt2004and cockpit-tls[28525]: cockpit-tls: gnutls_handshake failed: A TLS fatal alert has been received.
10月 25 16:38:09 ubt2004and cockpit-tls[28525]: cockpit-tls: gnutls_handshake failed: A TLS fatal alert has been received.
四、登录管理界面
使用管理员用户登录管理界面
五、使用podman容器管理
1、创建容器
2、管理容器
六、总结
综上所述,cockpit在linux服务器的web运维管理功能方面确实比较强大,解决了需要开发、运维人员的许多日常难题的,让系统维护可以用可视化的方式呈现。