Quantcast
Viewing all articles
Browse latest Browse all 1507

How to Install Cockpit on Linux CentOS 7

Cockpit is an easy to use server administrator for Linux based systems. It is a free software which is released under LGPL v2.1.  Its purpose is to be able to manage multiple servers in a user-friendly manner.  Unlike other tools, it does not go deep into server configuration but tries to simplify the server administration especially for beginners.  Cockpit is useful in performing simple tasks like starting and stopping of different services, administering storage, journal inspection etc. It makes use of systemd underneath.

Installing Cockpit

I have used a CentOS 7 system in this article and as Cockpit is not available in the CentOS repository, it needs to be cloned from the sig-atomic-buildscripts repository.

[root@ceph-storage ~]# git clone https://github.com/baude/sig-atomic-buildscripts
Cloning into 'sig-atomic-buildscripts'...
remote: Counting objects: 95, done.
remote: Total 95 (delta 0), reused 0 (delta 0), pack-reused 95
Unpacking objects: 100% (95/95), done.

Now you can install it using yum:

yum install cockpit

If you are using Ubuntu, execute the following commands:

sudo add-apt-repository ppa:jpsutton/cockpit

sudo apt-get update

sudo apt-get install cockpit

Enable cockpit service

[root@ceph-storage ~]# systemctl enable cockpit.socket
ln -s '/usr/lib/systemd/system/cockpit.socket' '/etc/systemd/system/sockets.target.wants/cockpit.socket'

If firewall is enabled in your system, you need to add Cockpit to the list of trusted services and restart firewall.

[root@ceph-storage ~]# firewall-cmd --peranent --zone=public --add-service=cockpit

[root@ceph-storage ~]#firewall-cmd --reload

Start the service

[root@ceph-storage ~]# systemctl start cockpit.socket

If you are on CentOS, you will need another step before you start using Cockpit. We need to modify the cockpit service file to disable SSL as there seems to be some issue with this. For this, edit the file /usr/lib/systemd/system/cockpit.service and change the line starting with ExecStart to the following:

ExecStart=/usr/libexec/cockpit-ws --no-tls

Please note that this work around may not be recommended on a production environment.  After this, reload systemd and restart cockpit.

[root@ceph-storage ~]# systemctl daemon-reload

[root@ceph-storage ~]# systemctl restart cockpit

Now you are ready to use the Cockpit GUI.

Web Interface

The Cockpit web interface can be accessed by using the server's ip address with port 9090

https://server-ip:9090

Image may be NSFW.
Clik here to view.
Login screen for Cockpit

You can login as root and start administering the servers. Once logged in, you will notice the below screen which displays an overview of CPU, Memory, Network Traffic and Disk I/O usage.

Image may be NSFW.
Clik here to view.
System output

Moving to the Services section, you have different tabs here namely Targets, System Services, Sockets, Timers and Paths.  They show the different system services, whether they are enabled, disabled, active, inactive etc.

Image may be NSFW.
Clik here to view.
system-services

Image may be NSFW.
Clik here to view.
Socket services

Containers part shows if Docker is installed / activated or not. If not, you can install / activate it from here.

Image may be NSFW.
Clik here to view.
Container dashboard

The journaling, networking and storage display the different logs, network and storage usage details respectively.

Image may be NSFW.
Clik here to view.
System logs
  Image may be NSFW.
Clik here to view.
Network usage
Image may be NSFW.
Clik here to view.
Storage details

Under the Tools section, we have Administrator Accounts using which we can either create new accounts or switch between different accounts.

Tools also provides a working console for the administrators.

Image may be NSFW.
Clik here to view.
Tools

Conclusion

Cockpit provides a pretty neat and simple user interface for new admins to manage Linux servers. But remember that it is accessible only via the web. You can visit its official page for more details. As this is relatively new, it might take some time before it gets wide-spread support.

The post How to Install Cockpit on Linux CentOS 7 appeared first on LinOxide.

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 1507

Trending Articles