How to Install Webmin on CentOS 8 and Rocky Linux 8

Webmin is an open-source web-based interface that simplifies the administration of Unix systems. Usually, to perform any kind of task in Linux like setting up accounts, setting up web servers, installing software, you have to manually run the commands and edit configuration files. Webmin lets you do all such tasks using a web-based interface. Using Webmin web interface, you can manage user accounts, firewalls, backups, manage software packages, create and configure virtual sites for Apache, monitor system resources graphically, configure network-related settings, and much more. It let you manage your system regardless of where you are and which browser you are using.

In this post, we will cover how to install Webmin on CentOS, configure firewall, access the Webmin web interface and how to uninstall Webmin if you ever need to do so.

On CentOS system, Webmin can be installed using the following two methods:

  • Installing Webmin on CentOS using Webmin Repository
  • Installing Webmin on CentOS using RPM Package

Note: The procedures shown here have been tested on CentOS 8 machine and will work on RockyLinux too.

Installing Webmin on CentOS using Webmin Repository

Webmin is not included in the official package repository of CentOS. In this procedure, we will install Webmin by using the Webmin repository.

Step 1: Add Webmin Repository

1. First, you will need to add the Webmin repository to your system repository. After adding the Webmin repository, you can install and update Webmin using the CentOS package manager.

To add Webmin repository to your system’s local repository, create and edit the webmin.repo file in the /etc/yum.repos.d repository:

$ sudo nano /etc/yum.repos.d/webmin.repo

Add the following lines in the file:

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

Now save the webmin.repo file and exit.

webmin.repo file

Step 2: Import Webmin GPG Key

You will need to add the Webmin GPG key to your system’s GPG keyring. First, download the GPG key using the below command:

$ wget https://download.webmin.com/jcameron-key.asc

Download the repository key

Then add the key to your system’s GPG keyring using the below command:

$ sudo rpm --import jcameron-key.asc

Step 3: Install Webmin

Now we can install Webmin on our CentOS machine. Here is the command to install Webmin:

$ sudo yum install webmin

Provide sudo password and if ask for confirmation, hit y to confirm. After this, the installation of Webmin will be started.

Install Webmin

After the installation is completed, you will see a message in the output telling you that the installation of Webmin is completed and how you can log in to its web interface.

Webmin successfully installed

Method #2 Installing Webmin on CentOS using RPM Package

In this method, we will install Webmin on the CentOS system using the RPM package available at Webmin's official website.

1. Install Dependencies

First, install some dependencies using the below command:

$ sudo yum -y install openssl perl perl-Net-SSLeay perl-IO-Tty perl-Encode-Detect

Webmin RPM package

Step 2: Download Webmin RPM

To download the Webmin RPM package, you can visit the Webmin Downloads site and download the RPM package for the CentOS system. Or you can use the below command to download it:

$ wget http://prdownloads.sourceforge.net/webadmin/webmin-1.981-1.noarch.rpm

Step 3: Install Webmin

Now in order to install Webmin RPM, use the command below:

$ sudo rpm -U webmin-1.981-1.noarch.rpm

Now the installation of Webmin will be started. After the installation is completed, you will see a message in the output telling you that the installation of Webmin is completed and how you can log in to its web interface.

Webmin RPM

After the installation is completed using any of the methods above, move on to the next step to configure yoru firewall.

Configure Firewall

Webmin uses port 10000 for listening connections on all of your system’s IP addresses. If you are accessing the Webmin interface from the same system on which Webmin is installed, then you don’t need to perform this step. However, if a firewall is running on your system and you want to access Webmin from another system, you will need to allow traffic on port 10000.

To allow traffic on port 10000, use the below command:

$ sudo firewall-cmd --zone=public --add-port=10000/tcp --permanent

Then reload the firewall using the below command:

$ sudo firewall-cmd --reload

Access Webmin Interface

To access the Webmin interface, access the following link in your web browser:

https://<ip-address>:10000

If you are accessing Webmin locally from the same system on which Webmin is installed, you can also use localhost instead of IP address.

The following login screen will appear on your screen. Sign in with the username root and your current password for the root user.

Webmin login

After you are logged in, you will see the following similar Webmin Dashboard.

Webmin

Now you can start using Webmin and manage your systems.

Uninstall Webmin

In case, you no longer require Webmin on your system, you can remove it as follows:

$ sudo yum remove webmin

In this post, we described how to install Webmin on the CentOS system. Now you can administer and manage your system from anywhere through a simple web interface. We also described how to uninstall Webmin in case you no longer require it on your system.