今日浏览CentOS 8的文档,突然发现了一个良心之作,CentOS 8推出cockpit,提供Web管理中心服务,我们一起看看他究竟提供了什么。
Step1.安装
dnf install -y cockpit #CentOS 8 开始使用dnf,命令语法与yum类似
# 开机启动配置
systemctl start cockpit.socket
systemctl enable cockpit.socket
放开你firewalld的魔爪
firewalld-cmd --permanent --add-service=cockpit
查看服务启动情况
[root@docker-1 ~]# ss -antpl|grep 9090
LISTEN 0 128 *:9090 *:* users:(("cockpit-tls",pid=14354,fd=3),("systemd",pid=1,fd=96))
[root@docker-1 ~]# systemctl status cockpit
● cockpit.service - Cockpit Web Service
Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
Active: active (running) since Tue 2020-07-21 13:27:49 CST; 13s ago
Docs: man:cockpit-ws(8)
Process: 14372 ExecStartPre=/usr/sbin/remotectl certificate --ensure --user=root --group=cockpit-ws --selinux-type=etc_t (code=exited, status=0/SUCCESS)
Main PID: 14375 (cockpit-tls)
Tasks: 6 (limit: 23799)
Memory: 4.1M
CGroup: /system.slice/cockpit.service
└─14375 /usr/libexec/cockpit-tls
Jul 21 13:27:49 docker-1 systemd[1]: Starting Cockpit Web Service...
Jul 21 13:27:49 docker-1 remotectl[14372]: /usr/bin/chcon: can't apply partial context to unlabeled file '/etc/cockpit/ws-certs.d/0-self-signed.cert'
Jul 21 13:27:49 docker-1 remotectl[14372]: remotectl: couldn't change SELinux type context 'etc_t' for certificate: /etc/cockpit/ws-certs.d/0-self-signed.cert: Child process exited with code 1
Jul 21 13:27:49 docker-1 systemd[1]: Started Cockpit Web Service.
Step2.“良心”能做什么?
首先我们要进行所有系统使用的首要步骤--登录,访问https://os_ip:9090/
cockpit提供管理远程服务器的支持。
概览
系统基本信息,提供CPU、内存、磁盘IO和网络接口流量实时监控,提供系统硬件接口信息,提供系统基本配置信息。
日志
提供系统日志的访问功能,可以基于时间、服务和日志级别进行过滤。
网络
提供网络流量监控,firewalld、NetworkManger管理等功能
firewalld管理:
Network管理:
账户管理
服务管理
系统服务管理,当前状态,服务启动状态管理
其他
- WEB Terminal
- SELinux管理
- 软件更新管理
Step3.总结
有此“良心”之作
- 你可以在不了解nmcli,ip link,brctl等等网络命令的前提下优雅的配置好你的网络;
- 你可以在不了解free,dstat,top,htop,并且不了解系统监控指标如何计算的前提下清晰的了解系统资源使用状况;
- 你可以在不会使用useradd命令的前提下管理用户;
- 你可以在不会使用tail的前提下,自由的徜徉在日志的海洋里;
- 你可以在不会使用systemd的前提下,管理你的服务。
OK ,总之,如果你是个运维小白,那么你至少可以快速的上手做点什么了......
Tips:其实命令行并不可怕,只是需要你投入一些精力去学习,WEB管理这种东西留给“用户”使用,作为一个运维人员,应该对于“使用它”,保持距离。
本文暂时没有评论,来添加一个吧(●'◡'●)