欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

【Linux】使用Cockpit进行主机管理

程序员文章站 2022-05-07 12:01:49
Cockpit 进行主机监控 官网文档: https://cockpit project.org/running.html 版本信息 针对Red Hat 安装步骤 在okd集群环境中使用 查询组件 安装 ......

cockpit 进行主机监控

官网文档: https://cockpit-project.org/running.html

版本信息

针对red hat

[root@master ~]# cat /etc/redhat-release
red hat enterprise linux server release 7.3 (maipo)

安装步骤

sudo subscription-manager repos --enable rhel-7-server-extras-rpms
sudo yum install cockpit
sudo systemctl enable --now cockpit.socket

在okd集群环境中使用

查询组件

[root@master cockpit]# yum makecache fast

[root@master cockpit]# yum search cockpit
已加载插件:fastestmirror, product-id, search-disabled-repos, subscription-manager
this system is not registered with an entitlement server. you can use subscription-manager to register.
loading mirror speeds from cached hostfile
========================================================================== n/s matched: cockpit ==========================================================================
cockpit-bridge.x86_64 : cockpit bridge server-side component
cockpit-composer.noarch : composer gui for use with cockpit
cockpit-dashboard.x86_64 : cockpit remote servers and dashboard
cockpit-doc.x86_64 : cockpit deployment and developer guide
cockpit-docker.x86_64 : cockpit user interface for docker containers
cockpit-kdump.noarch : cockpit user interface for kernel crash dumping
cockpit-kubernetes.x86_64 : cockpit user interface for kubernetes cluster
cockpit-machines.x86_64 : cockpit user interface for virtual machines
cockpit-machines-ovirt.noarch : cockpit user interface for ovirt virtual machines
cockpit-networkmanager.noarch : cockpit user interface for networking, using networkmanager
cockpit-packagekit.x86_64 : cockpit user interface for package updates
cockpit-pcp.x86_64 : cockpit pcp integration
cockpit-selinux.noarch : cockpit selinux package
cockpit-sosreport.noarch : cockpit user interface for diagnostic reports
cockpit-storaged.noarch : cockpit user interface for storage, using udisks
cockpit-subscriptions.noarch : cockpit subscription user interface package
cockpit-system.noarch : cockpit admin interface package for configuring and troubleshooting a system
cockpit-tests.x86_64 : tests for cockpit
cockpit-ws.i686 : cockpit web service
cockpit-ws.x86_64 : cockpit web service
subscription-manager-cockpit.noarch : subscription manager cockpit ui
cockpit.x86_64 : a user interface for linux servers

安装

# 只能做管理, 无法做预警
# cockpit + k8s: https://access.redhat.com/solutions/2206041
# 改端口:  https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/getting_started_with_cockpit/index#changing_the_cockpit_port
sudo yum install -y cockpit cockpit-docker cockpit-kubernetes cockpit-dashboard
sudo systemctl start cockpit
sudo systemctl enable cockpit
# https://localhost:9090


# 分发密匙
# ssh-copy-id -i /root/.ssh/id_rsa root@node