What is Virtualmin / Webmin?
Virtualmin / Webmin is a widely used web based control panel for Linux servers. It has both free version and Pro version. Functions are almost same but Pro versions have more utilities and they offer support for it. You can choose the version that you can afford and matches your requirement. For both the versions, installation procedures are same.
Installation & Configuration of Free Virtualmin/Webmin
In this tutorial we’ll show you how to install and setup the free version.
First we need to update the system packages because in almost all the newly provisioned servers, most of the dependency packages will be the same.
sudo yum -y update
The Virtualmin install script requires perl for execution. So we need to install it, incase it is not installed in the yum update.
sudo yum -y install perl
Next step is to download the desired Virtualmin installer.
sudo wget http://software.virtualmin.com/gpl/scripts/install.sh
Virtualmin installation is simple, you just need to execute the installation script and that’s it.
sudo sh install.sh
This will begin the installation and it will take some time for the process to complete. Here is a screenshot of the installation.
As you can see from the screenshot, you’ll need to press ‘y’ and hit enter to continue the process.
The above screenshot marks the end of the installation process. So it only took 4 steps for the installation. Now, the tricky part is the Post Installation step. It is easy to set it up if you know what you are doing.
You can follow the screenshots of the settings.
Above given is the Post-Installation wizard, just click Next to proceed.
We have enabled the Preload Virtualmin libraries option for reducing the processing time and Run email lookup server option to prevent spam mails from bulking the inboxes. These settings are recommended only if you have sufficient memory.
This is to install ClamAV scanner which is to scan for the viruses, malwares etc. Again, this consumes memory and is recommended if memory is sufficient.
This window is to enable or disable SpamAssasin server filter. It is a good tool which helps in spam protection and I’m installing it for security reasons.
You can install MySQL or PostgreSQL from the above window. You can install either of these as per your requirement. Please note that if you are using CentOS 7 distro, by default MariaDB will be installed as the repo is built for MariaDB. You’ll have to remove MariaDB and install MySQL manually after the Virtualmin setup.
We have selected MySQL installation and you can set MySQL password in this window. This will be Root MySQL user password. You’ll have to add the MySQL usename and password in the file ‘/root/.my.cnf’ for authenticating MySQL Root user with password. Otherwise, if you access MySQL via Command Line, it will show the error in the screenshot given below.
You can refer the below given screenshot for setting the MySQL Root password in /root/.my.cnf. Stop MySQL service before doing this.
Restart MySQL afer this for the changes to take effect.
Now, we can go ahead with the rest of the installation process.
This window is to set the MySQL configuration size. You can set the value depending on your MySQL connections and transactions. Click Next.
Next window is to setup the name server records added in the zone file of each domain. For eg: if your domains are using the name servers ns1.server.com and ns2.server.com, then you can set those name servers here and it will be added in the NS record by default every time a zone file is created.
Next is to store plain-text passwords or hashed passwords. I’m going ahead with plain-text password because with hashed passwords, password recovery of Virtual Servers (Which we will see later in this article) is not possible. If you can keeep track of your passwords well, you can go ahead with hashed passwords.
With this Post-Installation configuration of Virtualmin/Webmin is complete. You can access Virtualmin/Webmin admin panel with the URL:- http://server.hostname:10000 or with http://IP.OF.SERVER:1000
The port in which wemin service is listening to is 10000. If the URL is not loading make sure webmin service is listening to the port 10000.
This will give you the status of the webmin service and if it is stopped, you can start it with,
You can also check if the port 10000 is listening with,
netstat -plan | grep 10000
If the service is running and the port is listening, you should be able to access Virtualmin/Webmin admin panel.
You can check the Virtualmin configuration via Virtualmin >> System Information >> Re-Check and Refresh configuration option as shown in the screenshot above.
If the screenshot is correct, it will show an output similar to this.
When an account for a domain is created in Virtualmin, it creates a separate Virtual Server for each of those account and you can specify the resources for each one. Here is how a sample Virtual Server is created.
You can create a new Virtual Server from Virtualmin >> Create Virtual Server
You just specify your Domain name, User name, Password, Contact Email address in this window and click on ‘Create Server’.
This will create your Virtual Server.
The above window shows that Virtual Server is created.
Virtual/Wemin offers lot of options and functionalites and this is just a begining. You can go through the options, refer each option for customizing your accounts. Virtualmin offers a great environment for Web hosting. Enjoy your time 🙂