5
头图
I have been using 0621443b0153e0 for a long time, and I want to experience CentOS 7 CentOS 8 . Accidentally found that CentOS 8 has a built-in visual management tool Cockpit , which can support some common command line operations, the interface is cool and powerful, I recommend it to everyone!

SpringBoot actual e-commerce project mall (50k+star) address: https://github.com/macrozheng/mall

Introduction to Cockpit

Cockpit is a built-in web-based visual management tool of CentOS 8 . It has interface support for some common command line management operations, such as user management, firewall management, server resource monitoring, etc. It is very convenient to use and is known as Linux management available to everyone. tool.

The following is the management interface of Cockpit , which looks pretty cool!

CentOS 8 installation

If you want to experience the latest version of Cockpit , you need to install CentOS 8 . Let's briefly talk about the installation of CentOS 8 .

  • When using the yum command of CentOS 8 to install software, you often encounter problems that cannot be downloaded. Switching to the mirror source of Alibaba Cloud can solve the problem. Here, the warehouse configuration of Centos-vault-8.5.2111.repo is used;
# 先将原BaseOS配置进行备份
mv /etc/yum.repos.d/CentOS-Linux-BaseOS.repo /etc/yum.repos.d/CentOS-Linux-BaseOS.repo.bak
# 再下载新配置
sudo wget -O /etc/yum.repos.d/CentOS-Linux-BaseOS.repo http://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
  • The yum warehouse configuration file is in the /etc/yum.repos.d directory, and then modify CentOS-Linux-AppStream.repo file and directly copy the CentOS-Linux-BaseOS part in appstream ;
[appstream]
name=CentOS-8.5.2111 - AppStream - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/AppStream/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/AppStream/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/AppStream/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
  • Run the following command to clear the cache and take effect;
sudo yum clean all
sudo yum makecache
  • Next, query an installation package information and test, and found that it can be used normally.

Cockpit installation starts

The following describes the installation and startup of Cockpit, which is very simple.
  • CentOS 8 has Cockpit installed by default, just start the service directly;
# 配置cockpit服务开机自启
systemctl enable --now cockpit.socket
# 启动cockpit服务
systemctl start cockpit
  • If you want to use Cockpit on CentOS 7 , you need to install it yourself and open the corresponding service;
# 安装
yum install cockpit
# 开放服务
firewall-cmd --permanent --zone=public --add-service=cockpit
# 重新加载防护墙
firewall-cmd --reload

Cockpit use

Before, we often used the command line to manage Linux servers. With Cockpit , we can happily use the graphical interface. Let's experience the functions of Cockpit .
  • View the basic information of the server through overview, including CPU memory usage, system information, server configuration, etc.;

  • Click to view more detailed monitoring information such as CPU, memory, disk, network, etc., which is basically an interface version of the top command;

  • Through storage, you can view more detailed file system information, manage volume groups and mount NFS;

  • Through the network, you can view the firewall and network monitoring information, and you can turn on and off the firewall;

  • Click firewall to view the open service ports, and add services through to open the ports directly. Are you still using the firewalld command?

  • Through Podman container management, you can download images and create running containers just like using Docker;

  • For example, we can create an nginx container based on the Nginx image and run it on port 80 ;

  • At this point, you can directly access the 80 port of the server to access the home page of Nginx;

  • Users in Linux can be easily managed through the account, and the useradd command is no longer needed;

  • In addition, Cockpit will also prompt us when the server software needs to be updated, and the update operation can be performed through the software update;

  • Some server applications can be downloaded through the application function. Currently, only a few can be installed, and we look forward to more choices in the future;

  • If the above functions cannot meet your needs, Cockpit also provides command line functions, which can be used by opening the terminal;

  • Cockpit also provides SELinux management, which can be turned on and off.

Summarize

As the official built-in visual management function of CentOS 8 , Cockpit does cover many commonly used server management functions, with a cool interface and easy to use! Friends who have upgraded to CentOS 8 , may wish to try it!

References

Official website documentation: https://cockpit-project.org/documentation.html

This article has been included in GitHub https://github.com/macrozheng/mall-learning , welcome to Star!

macrozheng
1.1k 声望1.3k 粉丝