Control Tool: How To Install Webmin on CentOS 7

Webmin Control Tool

Introduction – A Web Based Control Tool

Webmin is a web control tool for UNIX (and other similar systems) which simplifies the management process. Normally, configuration and maintenance tasks require a lot of manual editing of text files, and the execution of command line tools, but with Webmin all these tasks can be performed through an easy to use web interface.

Some of the tasks Webmin can help with include:

  • Change system’s IP address, DNS Server settings and routing configuration
  • Share files with Windows systems through Samba
  • Install, view and remove packages in many formats, like RPM.
  • Export files and directories to other systems with the NFS protocol
  • Create and configure a virtual web server for Apache
  • Set up Disk Quotas to control how much space users can use up
  • Manage UNIX accounts
  • Manage databases, table and fields in MySQL or PostgreSQL Database Server

Webmin has a modular design, which means that its functions are contained in modules that can generally be installed or removed independently from the rest of the program. The ACH module is responsible for managing some services and servers.

Webmin is a configuration and control tool that will read the configuration files already present on the system and update them directly.

This tutorial explains how to install Webmin on a server running Apache Web Server on top of CentOS 7.

Install Webmin

First, add the Webmin repository to the YUM repositories list. Create a new file:


# $EDITOR /etc/yum.repos.d/webmin.repo

In this file paste the following content:

[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1

Save and exit.

Add the Webmin author’s key:

$ wget http://www.webmin.com/jcameron-key.asc
# rpm --import jcameron-key.asc

Next, install Webmin with

yum

:

# yum install webmin

At the end of the installation process, you should see the following message:

Webmin install complete. You can now login to https://example.com:10000/
as root with your root password.

Secure Connections with Let’s Encrypt

By default, Webmin is configured to use HTTPS by using a self-signed certificate. At this point, we need to replace this certificate with a valid one obtained from Let’s Encrypt.

With a web browser, go to 

https://example.com:1000

. During the first connection, the browser will signal an “Invalid SSL” error. This is due to the fact that Webmin is using a self-signed certificate that is not trusted. Allow an exception in order to continue replacing the certificate with the secure one.

Webmin will prompt a login screen. Here, sign in with “root” as the username and the current root password as the user.

After logging in, the browser will display the Webmin dashboard. First of all, set a hostname by clicking on the link to the right of System hostname. A new page will show up where it’s possible to change the Hostname, entering the FQDN into the correct field. Click on Save to apply the changes.

On the left bar, click on Webmin > Webmin Configuration. Click on SSL Encryption and open the Let’s Encrypt tab. In this tab, enter all the information required to secure the connections to Webmin with a valid certificate. Then, reload the page to use the new certificate.

Conclusion

At this point Webmin is correctly installed and running. Through its interface it is now possible to manage a UNIX-like system almost entirely without needing to manually edit text-only configuration files.

Note: This tool was created for those who are familiar with Linux but are not familiar with all the system administration details. If you already have strong skills and expertise pertaining to system maintenance, you may not like this tool as it will always be slower than editing configuration files directly.