قالب وردپرس درنا توس
Home / Tips and Tricks / How to Manage Linux Servers with Cockpit – CloudSavvy IT

How to Manage Linux Servers with Cockpit – CloudSavvy IT



Managing a network of Linux servers required the use of a terminal emulator to ssh to each of your servers. To update a local firewall rule, system administrators had to learn mysteriously iptables commands to add the correct incoming and outgoing ports. To add a new local user you must run useradd with the necessary options. And to check the free space on the local file systems, Linux administrators probably ran df and du jobs on any storage system.

Linux server management would be much easier with a point-and-click interface that did all the hard work behind the scenes for you, so you could focus on your job: managing servers. That’s where Cockpit comes in.

Cockpit offers a web-based dashboard so you can monitor and update your Linux systems. I find with Cockpit that remote server management is a piece of cake. Let̵

7;s see what Cockpit has to offer:

To access Cockpit on your server, point your web browser to your server’s IP address on port 9090. For the Raspberry Pi mini server I’m running at home, that’s 10.0.0.11:9090 . But your network will likely be different; use the hostname or IP address of your Linux server in the URL line of your web browser and add :9090 to connect to port 9090. Log in with the root username and password for that server.

Log into Cockpit with your local username and password.

After you log in, Cockpit displays a system overview screen. It allows you to check your server status at a glance: CPU and memory usage, server information, configuration overview and overall server status. You can see on my Linux system that everything is fine, but I need to install some new patches.

The system overview also makes it easy to shut down or restart the server, for example for system maintenance. The overview also provides a great starting point for more complex tasks. If you need to connect your server to a domain or need more details, you can click the blue links.

Cockpit shows your system status at a glance.

The left side of the Cockpit dashboard shows a navigation menu. Click each to check logs, storage and networks, update accounts, stop and start services, or apply updates.

Checking logs is easy on the “Logs” tab. Never wade through you again /var/log directory, to find errors or warnings. Cockpit shows the log entries with a handy icon to indicate errors or warnings. Click the menus at the top of the screen to filter logs by time, priority or identification. The default shows everything at “Error” and above.

If you need more information about a particular log message, you can click on it for details. For example, I am running my Raspberry Pi as a print server and the logs showed that my printer was turned off when I tried to print.

Cockpit makes it easy to view logs. This indicates that my printer was turned off when I tried to print.

The “Storage” tab displays your file systems and storage I / O at a glance. You can also add other storage from this panel, including external NFS file systems.

My Raspberry Pi server has an internal micro SD card for the main memory and a USB fob drive mounted on it /backup so that I can make backups. In the “Storage” tab I can quickly see my disk usage to verify that my backup file system is about half full and my main memory is mostly empty.

Cockpit allows you to view the status of all your storage.

The “Networks” tab allows me to monitor the network on one screen. My Raspberry Pi only works on my wireless network at home, so only my wlan0 network device shows all traffic.

Cockpit shows your network usage in a handy graph.

Managing your firewall is also much easier. Click the “Edit Rules and Zones” button to open a panel that allows you to add or remove services from the firewall. No more debugging a list with iptables commands to update your firewall rules. Now you can add and remove services from the firewall by clicking a button and scrolling through a list of services. Check the box next to the services you want to add and click the “Add Services” button.

To add a new service to your firewall, select the service in Cockpit.

If you need to manage local accounts, you can do that from the “Accounts” tab. You can quickly create new users with the “Create new account” button, or click on a username to edit the account information. You can even add and remove SSH keys to support login without a password.

Easily manage local accounts with Cockpit.

In the “Services” tab you can start and stop services. Click on each service and you will find a switch to enable or disable a service during startup, or to immediately reload, restart, or stop a service that is already running.

Start, stop, enable and disable services with Cockpit.

My Raspberry Pi is a scratch server on my private home network, but it’s still important to keep it up to date with the latest patches. When you manage your server with Cockpit, you may see a warning icon next to the “Software updates” tab. That will let you know that your system needs to be updated. You can choose to update everything by clicking the “Install all patches” button, or you can install only the most critical patches by clicking the “Install security updates” button.

Install updates via Cockpit at the touch of a button.

And despite all that Cockpit has to offer, if you need to do something manually on the server, you can click the “Terminal” tab to open an interactive shell. This is useful when you need to do something on the command line, including editing configuration files or running scripts.

The default terminal display is white-on-black text, with the “Black” color profile. You can adjust the colors to your preferences using the ‘Appearance’ menu, to set the colors to white text on a dark blue background (‘Dark’) or black text on an off-white background (‘Light’) or just black. on-white text (“White”).

Do you need to log in as root? Cockpit offers a web-based terminal.

Using Cockpit makes server management a breeze. I find Cockpit helps automate the routine things and makes the difficult things easier to do. The interface is simple yet powerful and the interaction feels intuitive. Install Cockpit on your server and streamline your system administration workflow.


Source link