Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install the server management software Cockpit on Linux

2025-04-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to install the server management software Cockpit on Linux. It is very detailed and has a certain reference value. Interested friends must finish reading it!

Cockpit is a free and open source server management software that allows us to easily manage our GNU/Linux server through its beautiful Web front-end interface. Cockpit makes it easy for Linux system administrators, system maintainers, and developers to manage their servers and perform simple tasks such as managing storage, detecting logs, starting or stopping services, and other tasks. Its reporting interface adds some good features to make it easy to switch between the terminal and the Web interface. In addition, it not only makes it easy to manage a single server, but more importantly, you can manage multiple servers connected to the network in one place with a single click. It is very lightweight and the Web interface is very easy to use. In this blog post, we will learn how to install Cockpit and use it to manage our servers running Fedora, CentOS, Arch Linux, and RHEL distributions. Here are some great features of Cockpit in our GNU/Linux server:

It contains the systemd service manager.

There is a Journal log viewer for troubleshooting and log analysis.

Storage configuration, including LVM, is simpler than ever before.

Basic network configuration can be done with Cockpit.

You can easily add and remove users and manage multiple servers.

1. Install Cockpit

First, we need to install Cockpit on our linux-based server. Cockpit installers are available in the official software repositories of most distributions. In this blog post, we will install Cockpit in Fedora 22, CentOS 7, Arch Linux, and RHEL 7 through their official software repositories.

CentOS / RHEL

Cockpit is available in the official CentOS and RHEL software libraries. We only need to use yum Manager to install it. You only need to run the following command with sudo/root privileges to install it.

# yum install cockpit

Install Cockpit on Centos

Fedora 22/21

Like CentOS, Fedora's official software library has Cockpit available by default. We only need to use the dnf package manager to install Cockpit.

# dnf install cockpit

Install Cockpit on Fedora

Arch Linux

Currently, there is no Cockpit available in the official Arch Linux software library, but the Arch user library (Arch User Repository,AUR) does. Just run the following yaourt command to install it.

# yaourt cockpit

Install Cockpit on Arch linux

two。 Start and enable Cockpit

After successfully installing Cockpit, we need to start the Cockpit service with the service / daemon manager. By 2015, although some Linux distributions were still running SysVinit management daemons, most Linux distributions used Systemd,Cockpit to use systemd to perform almost everything from running daemons to services. Therefore, we can only install Cockpit in linux distributions running Systemd. To start Cockpit and have it start automatically each time the system is rebooted, we need to run the following command on the terminal or console.

# systemctl start cockpit # systemctl enable cockpit.socket Created symlink from / etc/systemd/system/sockets.target.wants/cockpit.socket to / usr/lib/systemd/system/cockpit.socket.

3. Allow through the firewall

After starting Cockpit and enabling it to start automatically every time the system is rebooted, we will now configure it with a firewall. Since we have a firewall program running on our server, we need to allow it to access Cockpit from outside the server through certain ports.

Firewalld

# firewall-cmd-add-service=cockpit-permanent success # firewall-cmd-reload success

Allow Cockpit to pass through Firewalld

Iptables

# iptables-An INPUT-p tcp-m tcp-- dport 80-j ACCEPT # service iptables save

4. Access the Cockpit Web interface

Next, we are finally going to access the Cockpit web interface through the Web browser. Depending on the configuration, we only need to open https://ip-address:9090 or https://server.domain.com:9090 with a browser. In our blog post, we open https://128.199.114.17:9090 with a browser, as shown in the following figure.

Access Cockpit Web services through SSL

A SSL authentication warning appears because we are using a self-signed authentication. We just need to ignore this warning and go to the login page. In chrome/chromium, we need to click Show Advanced and then click Proceed to 128.199.114.17 (unsafe).

Cockpit login interface

Now, to get into the dashboard, we need to enter detailed login information. Here, the username and password are the same as the username and password used to log in to our linux server. When we enter the login information and click the Log In button, we go to the Cockpit dashboard.

Cockpit dashboard

Here we can see all the menus and visualization results of CPU, disk, network, and storage usage. The dashboard is shown in the image above.

Service

To manage the service, we need to click the Services button in the menu on the right side of the web page. Then, we will see that services are divided into five categories, goals, system services, sockets, timers, and paths.

Cockpit service

Docker container

We can even use Cockpit to manage docker containers. Monitoring and managing Docker containers with Cockpit is very simple. Since docker is not installed and running on our server, we need to click Start Docker.

Cockpit container

Cockpit automatically installs and runs Docker on our server. After startup, we will see the screenshot below. Then we can manage Docker images and containers as required.

Cockpit Container Management

Journal Log Viewer

Cockpit has a log viewer that divides errors, warnings, and notes into different tabs. We also have an All tag page where you can see all the log information.

Cockpit Journal log

The network

In the network section, we can see two graphs that visualize the sending and receiving speed. We can see that there is a list of available network cards, as well as options for Add Bond, Bridge, and VLAN. If we need to configure a network card, we only need to click the name of the network card. Below, we can see the Journal log information of the network.

Cockpit Network

Storage

Now, you can easily check the read and write speed of the hard disk with Cockpit. We can view the stored Journal logs for troubleshooting and repair. There is also a visualization of the used space on the page. We can even uninstall, format, or delete a partition of a hard disk. It also has attack capabilities such as creating RAID devices, volume groups, and so on.

Cockpit Storage

User management

Through the Cockpit Web interface, we can easily create new users. The account created here will be applied to the system user account. We can use it to change passwords, specify roles, and delete user accounts.

Cockpit Accounts

Real-time terminal

Cockpit also has a great feature. Yes, we can execute commands and use the real-time terminals provided by the Cockpit interface to perform tasks. This allows us to switch freely between the Web interface and the terminal according to our needs.

The above is all the contents of the article "how to install the server management software Cockpit on Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 214

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report