在 CentOS 上安装 Cockpit
Cockpit 在 CentOS 7 和更新版本的默认存储库中可用。 要在 CentOS 7 中安装 Cockpit,请运行:
$ sudo yum install cockpit cockpit-machines
在 CentOS 8 上:
$ sudo dnf install cockpit cockpit-machines
安装后,使用命令启动 cockpit 服务:
$ sudo systemctl enable --now cockpit.socket
如果您想从其他远程系统访问 Cockpit Web 仪表板,您需要允许 Cockpit 服务通过防火墙。 为此,请运行:
$ sudo firewall-cmd --permanent --zone=public --add-service=cockpit
$ sudo firewall-cmd --reload
怎样在 Cockpit 仪表板中添加新主机
Cockpit 可以同时管理多台服务器。
登录 Cockpit 网络仪表板。
如果您使用的是 Ubuntu,请确保您已选中显示的选项 “对特权任务重复使用我的密码” 在密码字段下。 这允许您通过 Cockpit 运行任何管理操作。 如果不选中此选项,则无法将任何远程系统添加到驾驶舱的仪表板或无法执行任何管理操作。 在RHEL、CentOS系统中,可以直接以root用户登录,不必勾选此项。
登录为 admin Ubuntu Cockpit 中的用户
单击左侧窗格中的“仪表板”按钮以查看由 Cockpit 管理的服务器列表。 您将在“服务器”选项卡下看到所有服务器。
要添加新服务器,请单击 + (加号)登录服务器选项卡。
可能提示 Cockpit 未安装 : 上未安装一个兼容版本的 Cockpit, 那么就需要在被控主机上安装与主控主机上一样的 Cockpit版本
插件
yum install cockpit cockpit-docker cockpit-machines cockpit-dashboard cockpit-storaged cockpit-packagekit