How to Install Webmin on Rocky Linux 8

Channel: Linux
Abstract: sudo ./webmin-1.979/setup.sh /usr/local/webmin/ This will install Webmin to /usr/local/webmin. During installationDownload Webmin tar archive file Let

Webmin is a web-based control panel for system administration. It is mainly designed for Linux/Unix-like system administrations. Webmin is written in Perl language.

Webmin web interface is used to set up user and disk management, Apache, DNS, PHP, MySQL, check CPU usage, system info, network config, and more.

In this tutorial, we learn how to install Webmin on Rocky Linux 8.

Most Effective Way to Install WordP...

To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video

Most Effective Way to Install WordPress without cPanel | Free Best Web Hosting Tutorial

Prerequisites

  • Rocky Linux 8 instance
  • Apache webserver - check install LAMP stack
  • DNS point to domain name
Install Webmin using the installer script

There are few ways to install Webmin on Rocky Linux such as using installer script, rpm package, or from the repository.

The benefit of installing Webmin using the installer script is that it will always have the latest version. It also helps to customize the installation directory, port, username/password, and enable at boot.

Step 1: Install the prerequisite packages

First install the required prerequisite packages such as wget, tar, and Perl which are not preinstalled on Rocky Linux 8.

$ sudo dnf install wget tar perl
Step 2: Download Webmin tar archive file

Let's download the latest version of the Webmin tar.gz file. This will download webmin-current.tar.gz file to your current directory.

$ wget https://www.webmin.com/download/webmin-current.tar.gz
Step 3: Extract the tar.gz file

Extract the tar.gz file to the current directory

$ tar xvf webmin-current.tar.gz

You can list the contents of the directory using ls command.

Output of ls command:

webmin-1.979 webmin-current.tar.gz

Here, the directory webmin-latest-version-number contains the latest version of Webmin. Here we are installing Webmin 1.979 version which is the latest version at the time of writing this tutorial.

Now you can delete the tar.gz file

$ rm -f webmin-current.tar.gz
Step 4: Install Webmin using the installer script

First, create a webmin directory in the path you want to install, e.g /usr/local/.

$ sudo mkdir -p /usr/local/webmin

Run the script, passing the just created directory as an argument:

sudo ./webmin-1.979/setup.sh /usr/local/webmin/

This will install Webmin to /usr/local/webmin.

During installation, the script may prompt you to customize some configuration options.

Below is a sample installation session showing queries and responses separated by colon (an empty response accepts the default shown, where applicable):

Config file directory [/etc/webmin]:
Log file directory [/var/webmin]:
Full path to perl (default /usr/bin/perl): 
Web server port (default 10000):
Login name (default admin): webminadmin
Login password: mypassword
Password again: mypassword
Use SSL (y/n): y
Start Webmin at boot time (y/n): y

Excerpt from output of successful installation:

...

Webmin has been installed and started successfully. Use your web
 browser to go to
 https://localhost.localdomain:10000/
 and login with the name and password you entered previously.

 ...

You can verify Webmin installed, type:

$ ps -ef | grep webmin

Output:

root       20337       1  0 07:06 ?        00:00:01 /usr/bin/perl /usr/local/webmin//miniserv.pl /etc/webmin/miniserv.conf
root       27369   20337  0 10:53 ?        00:00:00 /usr/bin/perl /usr/local/webmin//miniserv.pl /etc/webmin/miniserv.conf
Step 5: Configure the firewall to enable Webmin port

Webmin by default listen to port 10000. If your machine is behind a firewall, the Webmin server port may be blocked. Thus, you need to adjust firewall settings to allow Webmin port.

$ sudo firewall-cmd --add-port=10000/tcp --permanent
$ sudo firewall-cmd --reload
Step 6: Access the Webmin Web interface

Upon installation of Webmin, navigate to https://your_example.com:10000 in your web browser, replacing your_example.com with the domain name you pointed at your server.

You may need to allow insecure connections on your browser, as Webmin by default only uses a self-signed certificate.

Webmin login page Webmin Dashboard

Webmin package updates can be done from the dashboard itself. Go to Dashboard, under Package updates - it will show if any updates are available. Click that link and press Update selected packages to start the update.

You can simply uninstall Webmin using the script /etc/webmin/uninstall.sh.

Step 7: Add SSL certificate using Let's Encrypt

From the Webmin dashboard, you can easily set up the Let's Encrypt SSL certificate.

Go to Webmin Configuration -> Let's Encrypt and press Install Now button to install cerbot package.

Cerbot install

Once cerbot package is installed, we can configure Lets Encrypt to request the certificate. We need to provide mainly hostname for certificate and webroot path to verify DNS (make sure apache webserver is installed for this).

Add SSL Certificate information

Click the Request Certificate button to release a new certificate for the domain.

Request Lets Encrypt Certificate

That's all we have enabled SSL on Webmin using the free Let's Encrypt certificate.

Install Webmin using RPM package

It is also possible to install Webmin using the rpm package available on the download page of Webmin. This is the quickest way to get Webmin up and running on your Linux machine.

01. Install dependencies

Since Webmin is written in Perl, you need to install Perl and its dependencies.

$ sudo dnf install perl perl-Net-SSLeay perl-Data-Dumper perl-Encode-Detect

02. Download and Install Webmin RPM package

This will install the latest version of Webmin using the rpm package.

$ sudo dnf install https://www.webmin.com/download/rpm/webmin-current.rpm

Output:

Installing       : webmin-1.979-1.noarch                                                                                                                                                                 1/1
   Running scriptlet: webmin-1.979-1.noarch                                                                                                                                                                 1/1
 Webmin install complete. You can now login to https://li1321-249:10000/
 as root with your root password.
 Verifying        : webmin-1.979-1.noarch                                                                                                                                                                 1/1
 Installed:
   webmin-1.979-1.noarch
 Complete!
Conclusion

In this tutorial, we learned how to install Webmin on Rocky Linux 8. If you have any questions, suggestions, feedback please write them in the comment box below.

Ref From: linoxide
Channels:

Related articles