How to Install and Configure Virtualmin on Almalinux 9

Estimated reading: 5 minutes 212 views

Virtualmin is a web hosting cpanel used for hosting websites, web applications, databases, and mailboxes. It comes with two packages, Webmin and Virtualmin. Webmin is a frontend server management tool that can be used by administrators to manage and monitor their systems with simple point-and-click. On the other hand, Virtualmin is an advanced front-end virtual host management tool that can be used to create, modify, and manage virtual hosts.

Virtualmin is a flexible tool with plenty of domain management utilities used by the hosting providers and the owners of the domains. It contains add-ons like antivirus and spam filtering mechanisms. It also provides a dashboard for monitoring user resource utilization and analytics features.

Virtualmin runs on select Linux environments, among them Almalinux systems. This guide will demonstrate how to install and configure Virtualmin on a newly installed Almalinux 9.

 1. Update the system

Make sure you are running on an updated system with all the packages up to date

# yum update
# yum upgrade

Also make sure your host has a fully qualified domain name (FQDN) (e.g.: host.example.com)

To change the hostname, use the command:

# hostnamectl set-hostname <your-hostname>

e.g:

hostnamectl set-hostname greencloudvps.com

Step 2: Download the Virtualmin install script

Download the script that will be used to install Virtualmin.

# yum install wget

# wget http://software.virtualmin.com/gpl/scripts/install.sh

The script will be downloaded to your current working directory.

Step 3: Install Virtualmin

Make the script executable by running the command below.

# chmod a+x install.sh

Now execute the script with the command:

./install.sh

This will launch downloading of the necessary packages and installation of the application.

The time it takes to install depends on the speed of your internet but it should take between 5 to 10 minutes.

The installation should be complete and exit the shell with the message indicating that the installation was successful.

The message also indicates that the service is running and can be accessible via the IP or the hostname if it is resolvable through the internet.

Step 4: Configure Firewall for Virtualmin

You will be required to open port 10000, which we shall use to access the Virtualmin web interface

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

# firewall-cmd --reload

Step 5: Configure Virtualmin on AlmaLinux 9

You have now successfully installed Virtualmin and It can now be accessible via the browser using the IP/hostname and port 10000.

On your browser, navigate to https://<hostname>:10000

Or

 https://<your_server_ip>:10000

Provide the username as root and the password is your root user password for the host.

Upon successful login, you will be presented with a post-installation wizard that is used to configure and optimize the system for production.

Click ‘Next’ to start the configuration.

Allow Virtualmin libraries to be preloaded to reduce issues with slow UI and navigation.

You can also enable ClamAV Virus scanning. This however calls for installation of other utilities to support the setup. We won’t be using ClamAV in our setup

You will also be required to choose which database you want to use in your hosting environment. We shall be using MariaDB in this setup.

Set the DB password:

Set up the DNS servers that will be used in our hosting environment.

Complete the steps and click ‘Finish’. You should now be able to use your hosting platform.

Then click Next > next > next -> Finish

You can access the dashboard where there are different tools that you can use to manage your hosting platform.

Step 6: Create a Domain on Virtualmin

After a successful installation and configuration of Virtualmin, the next step is to try to set up a domain to test if our hosting platform is ready.

In Virtualmin, domains are termed as Virtual Servers

On the dashboard, click on ‘Create Virtual Server’. You will then be required to provide the domain name and the administrative password.

You can also create a subdomain from the same interface. To do so, use the ‘Alias of <hostname>‘ tab.

Then finally click the Create Server button.

This will create an account with the domain name you have created and can now be used as a web server. Ideally, this creates a virtual host in the background and assigns its directory and database.

You can navigate the filesystem of the newly created domain by clicking on the File Manager tab on the left. This presents a filesystem just like cPanel, where your index files should be placed in the Public_html directory.

Conclusion

We have successfully installed Virtualmin and deployed a working domain on Almalinux 9

Virtualmin is a simple front-end domain management tool that is very handy for system administrators who wish to try open-source alternatives.

It has all the features and capabilities that you require for domain hosting, using its simple, yet powerful web tool.