System Administration in Linux constantly requires a Linux admin or user to spend copious amounts of time on the terminal running commands. Over time, however, running commands on a dark console can induce some boredom, and a graphical alternative can bring much relief.
Webmin is an open-source and easy-to-use web-based Linux administration tool that allows sysadmins to easily configure the Linux systems remotely via a web browser. It provides an intuitive dashboard with real-time monitoring of integral metrics such as CPU and RAM. Additionally, you can perform basic sysadmin tasks such as user account management, package management, configuring the firewall, and creating cron jobs to mention a few.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Virtualmin and Webmin Installation queries.
In this context, we shall look into the complete installation procedure of Webmin on Rocky Linux 8.
Steps to install Webmin on Rocky Linux system
Before performing this installation procedure, ensure that the following requirements are met:
There are different methods to install Webmin. You can download and run the RPM package, you can install from the repository or better yet, install Webmin from an automated installer script. Installation from the installation script is the most preferred way since it gives you the latest package. Also, it automates the creation of custom directories and the creation of the admin user and password.
Here, we will install Webmin using the installation script on Rocky Linux.
1. Download the Webmin archive file
Webmin's download page offers an array of binary package formats that you can download; from RPM to Deb packages for Debian-based distributions. We are going to download the compressed tarball file which contains the installation script.
To do this, download it with the below command:
$ wget https://prdownloads.sourceforge.net/webadmin/webmin-1.979.tar.gz
You can verify the download using the ls command:
$ ls -l | grep webmin
You can verify the authenticity of the download using MD5 verification:
$ md5sum webmin-1.979.tar.gz
This will display the MD5 checksum.
The checksum should correspond to the checksum on the download site. You will see that the checksum values from the terminal correspond to the one on the site.
2. Extract the Webmin archive
Now, We are going to extract the Webmin's archive using the tar command provided below:
$ tar -xvf webmin-1.979.tar.gz
This decompressed all the contents of the compressed file into a Webmin directory.. You use the ls command to verify its existence:
$ ls -l | grep webmin
3. Install Webmin from the installation script
Now, we have all the required files needed for the installation of Webmin. The next course of action is to create a Webmin directory in the /usr/local/ path which is the directory used to store applications locally by sysadmins.
$ sudo mkdir -p /usr/local/webmin
Next, run the installation script against the newly-created directory:
$ sudo ./webmin-1.979/setup.sh /usr/local/webmin
The script will set off a series of prompts. For simplicity, accept the defaults by pressing ENTER.
Next, Create an Administrator by providing the login name and password. Be sure to also use SSL for purposes for the sole purpose of providing encryption on the webmin site.
The script will run a couple of tasks and this takes a while – approximately 10 minutes. Finally, if all went well, Webmin will be installed successfully and the URL with which you can login with will be provided. By default, Webmin listens to port 10000.
4. Configure the firewall to allow access to Webmin
Since Webmin will mostly be accessed remotely, it's important to allow access to it to external users. Therefore, be sure to open port 10000:
$ sudo firewall-cmd --add-port=10000/tcp --permanent
Then reload the firewall to apply the changes that you've just made:
$ sudo firewall-cmd --reload
5. Access Webmin
i. To access Webmin, browse the URL shown below:
https://server-IP or FQDN:10000
ii. Initially, you will get an alert of an impending security risk if you continue browsing. But don't worry, this is simply because we chose to encrypt Webmin with an SSL certificate which is not recognized by CA – Certificate Authority. To get around this, click on the 'Advanced' button.
iii. Hit the 'Accept the Risk and Continue' button to move on to the login page.
iv. On the Login page, key in the admin username and password and chit the 'Sign In' button.
The Webmin dashboard will come to view. At a glance, you can view crucial metrics such as CPU, RAM and Disk utilization and other details such as hostname, OS version, time and date, Uptime, kernel and CPU version to mention a few.
Scrolling down reveals some real-time stats of metrics such as Memory, CPU, Swap and disk I/O in a graph format.
On the left sidebar are additional options that you can look around and configure.
6. Add SSL certificate using Let's Encrypt
i. From the Webmin dashboard, you can easily set up the Let's Encrypt SSL certificate.
ii. Go to Webmin Configuration -> Let's Encrypt and press Install Now button to install cerbot package.
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).
iii. Click the Request Certificate button to release a new certificate for the domain.
This will enable SSL on Webmin using the free Let's Encrypt certificate.
[Need help in Installing and configuring Virtualmin Server ? We can help you. ]