Cockpit安装
LiuSw Lv6

Cockpit安装

1.Cockpit简介

1
Cockpit是一个免费且开源的基于web的管理工具,系统管理员可以执行诸如存储管理、网络配置、检查日志、管理容器等任务。通过Cockpit提供的友好的 Web 前端界面可以轻松地管理我们的 GNU/Linux 服务器,非常轻量级,Web 界面也非常简单易用。更重要的是通过Cockpit可以实现集中式管理。

2.功能特点

下面是 Cockpit的一些功能和特点:

  • Cockpit使用systemd完成从运行守护进程到服务几乎所有的功能
  • 集中式管理,通过一个会话窗口管理网络中的所有Linux服务器
  • 创建和管理Docker容器
  • 创建和管理KVM、oVirt虚拟机
  • 包括 LVM 在内的存储配置
  • 基本的网络配置管理
  • 用户user account管理
  • 基于web的 终端
  • 图形化的系统性能展示
  • 使用sosreport收集系统配置和诊断信息
  • 支持Debian, Redhat, CentOS, Fedora, Atomic, Arch Linux, and Ubuntu.

3.模块

1
2
3
4
5
6
7
8
9
10
Package Name	          Purpose
cockpit-docker Managing Docker Containers
cockpit-kubernetes Visualizing and Configuring Kubernetes Cluster
cockpit-machines Manage KVM Virtual Machines
cockpit-sosreport Create diagnostic report with the sosreport tool
cockpit-selinux Troubleshoot SELinux Issues
cockpit-kdump Configure Kernel Crash Dumps
cockpit-subscriptions Manage System subscription
cockpit-machines-ovirt Manage oVirt Virtual Machines
cockpit-pcp Reading PCP metrics and Loading PCP archives

4.安装

确认YUM源可用

这里是在CentOS7中进行安装,CentOS的软件仓库中包含有cockpit安装包

1
yum list |grep cockpit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[root@k8s-node1 ~]# yum list |grep cockpit 
cockpit.x86_64 195.12-1.el7.centos extras
cockpit-bridge.x86_64 195.12-1.el7.centos extras
cockpit-composer.noarch 9-1.el7 extras
cockpit-dashboard.x86_64 195.12-1.el7.centos extras
cockpit-doc.x86_64 195.12-1.el7.centos extras
cockpit-docker.x86_64 195.12-1.el7.centos extras
cockpit-kubernetes.x86_64 195.12-1.el7.centos extras
cockpit-machines.noarch 195.6-1.el7.centos extras
cockpit-machines.x86_64 195.12-1.el7.centos extras
cockpit-machines-ovirt.noarch 195.12-1.el7.centos extras
cockpit-packagekit.noarch 195.6-1.el7.centos extras
cockpit-packagekit.x86_64 195.12-1.el7.centos extras
cockpit-pcp.x86_64 195.12-1.el7.centos extras
cockpit-storaged.noarch 195.12-1.el7.centos extras
cockpit-subscriptions.noarch 160-1.el7.centos extras
cockpit-system.noarch 195.12-1.el7.centos extras
cockpit-tests.x86_64 195.12-1.el7.centos extras
cockpit-ws.i686 195.10-1.el7.centos base
cockpit-ws.x86_64 195.12-1.el7.centos extras
subscription-manager-cockpit.noarch 1.24.45-1.el7.centos updates

开始安装

1
yum -y install cockpit cockpit-dashboard cockpit-storaged cockpit-packagekit

启动cockpit服务

1
systemctl enable --now cockpit.socket

添加防火墙规则

1
2
firewall-cmd -permanent -add-service=cockpit
firewall-cmd -reload

5.登录

Cockpit使用9090端口,并且为SSL加密访问,通过浏览器登陆https://ip.add.re.ss:9090

登陆时浏览器会提示链接不安全,如果是Firfox浏览器,点击添加例外

输入安装了cockpit的系统账号(用户名和密码和用于登录linux 服务器的用户名和密码相同)

 评论