Keep watch over your server system with Webmin
Log Files, System Monitoring, and Automatic Jobs
Even with logfiles, Webmin clearly distinguishes between its own stuff and the operating system in which it runs. The Webmin | Webmin Actions Log window is a search interface for Webmin's internal log. Use it whenever you need to figure out exactly what you did in all of Webmin or just in some of its modules.
Rotation of system logfiles – and definition of post-rotation commands for each of them – has its own panel in the System section. Monitoring system performance is split between Networking | Bandwidth Monitoring and Others | System and Server Status. In the latter window, you can activate tens of system monitors, and you can set how often they should run and to which email address they should send updates and warnings.
Speaking of automated actions, the most useful part of Webmin might be its interface to set up and control cron jobs – that is, automatic execution of specific commands or scripts at regular intervals. From the visual point of view, the form in System | Scheduled Cron Jobs might be outdated, but it makes it very, very easy to create cron jobs that run only when you want. You can even specify a non-recurring range of dates in which each job should be executed and define which users can have their own cron jobs.
Firewall and Servers
The most critical part of the Networking section is probably the configuration of your firewall. By default, Webmin includes two modules for firewall configuration, called FirewallD and Linux Firewall. Which one is more appropriate depends on which distribution you are running. Luckily, Webmin is smart enough to advise you, in most cases, which you should use.
Out of the box, Webmin knows how to configure the servers corresponding to the essential services of any Linux system: remote access via SSH; websites with Apache; databases with MySQL; and email with Postfix, Procmail, and SpamAssassin. Many more servers, from DNS to DHCP, have separate modules that you can activate with a few clicks.
On one hand, this part of Webmin is the least useful: This is not Webmin's fault, it's just the nature of the beast. Regardless of which flavor of Linux you use, any configuration interface for services like running websites or email can only do so much for its users. Webmin has many practical forms that help a lot – and save lots of time – to set each variable of those servers; however, it's still up to you to know what those variables mean.
Beyond the GUI: Advanced Webmin Usage
No software interface is really useful if you cannot customize at least part of it to your specific needs or occasionally do something that is not specifically listed in its menus. Webmin provides several functions that make these things possible even without hacking its source code.
To execute a command that you would otherwise have to enter at a shell prompt, click on Others | Command Shell and type the command. To do serious terminal work, choose Others | Text Login (Figure 4). This option opens a terminal inside your browser in which you can run all the commands and scripts you want inside a secure SSH session. If there's a command that you want to assign to a clickable button for frequent use, add it in the Others | Custom Commands page shown in Figures 5 and 6.
These features alone make Webmin flexible enough for most users, but there is more: If you want to save even more time, you can write Perl scripts that will use Webmin on your behalf, using the XML Remote Procedure Call protocol. To understand how this trick works, look at Listing 1, which shows the essential parts of one of the sample scripts provided by the Webmin developers [5]. This script connects to your Webmin with the credentials in the single line of a file called url.txt
(line 1), which has the following format:
Listing 1
Using Webmin from a Perl Script
https://USERNAME:PASSWORD@yourserver.com:10000/xmlrpc.cgi
Lines 2 to 6 create an object that connects to the specified Webmin instance. Using the cron::list_cron_jobs
method, lines 7 to 10 check whether a cron job that executes the command echo foo
as user root
already exists. If yes, it is deleted (remember, this is just an example). Otherwise (lines 17 to 25), the server object is told to connect to Webmin again to create the cron job with the specified parameters. Of course, in real life, the user
and command
terms specified in the script would be parameters passed to the script.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.