I have been using 0621443b0153e0 for a long time, and I want to experienceCentOS 7
CentOS 8
. Accidentally found thatCentOS 8
has a built-in visual management toolCockpit
, 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 ofCockpit
, you need to installCentOS 8
. Let's briefly talk about the installation ofCentOS 8
.
- The installation of
CentOS 8
is basically the same as that ofCentOS 7
. The latest version of8.5.2111
is installed here. For the specific installation, please refer to Virtual Machine Installation and Use of Linux. This article is enough! , mirror download address: https://vault.centos.org/8.5.2111/isos/x86_64/
- 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 ofCentos-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 modifyCentOS-Linux-AppStream.repo
file and directly copy theCentOS-Linux-BaseOS
part inappstream
;
[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
- After the installation is complete, you can access through a browser, and you can log in as a Linux user (such as the root user)
Cockpit use
Before, we often used the command line to manage Linux servers. WithCockpit
, we can happily use the graphical interface. Let's experience the functions ofCockpit
.
- 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!
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。