Virtualmin GPL is a free and open source powerful and flexible web hosting control panel. It is based on the well-known web based application named Webmin. It features a CLI, full API, excellent security features and great support. It provides a collection of very easy to use tools for managing web sites, mailboxes databases, web application development and more.
Requirements
Virtualmin does not require any special hardware but we recommend that you install Virtualmin in a freshly installed server for the best experience.
We will need to set a hostname for our machine and we can do so with following command :-
First of all check current hostname using this command:
hostname -f
In order to change the hostname run following command :-
hostname newhostname.domain.com
Before installing any package on your system it is recommended that you update the system and available packages. Run the following command to do so.
yum -y update
You will see something like this:
HP_NO_IMG/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/634923335.png” alt=”” />
Downloading Virtualmin
VIrtualmin can be installed in many ways but we recommend you to install Virtualmin using an automated script which will will automatically install every packages take responsibility to complete them . To do so download script file using wget command .
wget http://software.virtualmin.com/gpl/scripts/install.sh -O /tmp/virtualmin-install.sh
HP_NO_IMG/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/113150462.png” alt=”” />
The file saved under the /tmp/ directory as virtualmin-install.sh.
Executing the Script
After the Virtualmin Script has been successfully downloaded, let’s execute the script file. To do so we will need to make script file executable using following command .
chmod +x /tmp/virtualmin-install.sh
Now the file is made executable so now we will execute it using sh as shown below .
sh /tmp/virtualmin-install.sh
The above command will start the Virtualmin installation and it will arise a license agreement , to install the Virtualmin press Y and then press ENTER .
HP_NO_IMG/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/777680738.png” alt=”” />
Firewall
A Firewall is installed in most of the systems as firewall solution, here we will construct the firewall program to allow the port 10000 to accessible from the internet . It will make virtualmin accessible for connected networks and to do so run following command.
firewall-cmd --permanent --zone=public --add-port=10000/tcp
If in case you have not installed firewalld on your system then first install firewalld using this command :-
yum install firewalld
After installing firewalld now unmask , enable and start the firewall with below commands:-
systemctl unmask firewalld
systemctl enable firewalld
systemctl start firewalld
After allowing 10000 port run this command
firewall-cmd --reload
Then you will see an output “Success”.
Accessing the Virtualmin
Now our Virtualmin is installed successfully and port 10000 is also exposed by the firewall program, we will point our web browser to our server as https://yourIPaddress:10000 in our web browser.
HP_NO_IMG/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/1780095011.png” alt=”” />
This will display a warning that your connection is not private but you just have to simply ignore it and continue by clicking Advanced ** button and then click on **yourIPadress(unsafe) which will be at the bottom of the browser .
After that you will see a Log In page to the webmin. Simply enter the username root and password of the system to get access to the control panel of Virtualmin.
HP_NO_IMG/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/64650030.png” alt=”” />
If in case you do not remember your password then we suggest you to please don’t attempt to brutally login like guessing the password, or keep repeating the login attempts. Because if you do so your IP address will be locked out for several minutes.
So it is better to change the password and to do so run the following command :-
passwd
And create a new password then Log In to the webmin.
Now you are logged in and you will see a dashboard with Post Installation Wizard.
HP_NO_IMG/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/1705795324.png” alt=”” />
Post Installation
Click on Next to continue to post installation wizard which is necessary to configure packages and elements of the Virtualmin . Here we will need to select the options that we require to setup our virtualmin.
Choose yes to **Preload Virtualmin Libraries ** as shown below.
HP_NO_IMG/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/2068014785.png” alt=”” />
Then click on Next and continue to post installation wizard now you will have to setup MYSQL databse server.
Choose Yes to Run MYSQL databse Server and choose No for the Run PostgresSQL database server (you can select yes if you want ) as shown below.
HP_NO_IMG/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/1107293413.png” alt=”” />
Click on **Next ** to continue to post installation wizard and by clicking Next you will have to set a MYSQL password .
Enter the password you want .
HP_NO_IMG/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/60915709.png” alt=”” />
Click on Next ** to continue to post installation wizard and with clicking you will have to choose the MYSQL database size . You can choose any option for database size but we recommend you to choose option **Large System (1G) which is mostly used .
HP_NO_IMG/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/1265832077.png” alt=”” />
Click on Next ** to continue to post installation wizard here you will have to set **Primary nameserver which is used for resolvability so simply enter the nameserver or you can select Skip Check for resolvability if you want.
Click on Next to continue to post installation wizard here you’ll be asked to choose the Password Storage Mode, we recommend you to choose Only store hashed passwords for security matters.
Click on **Next ** and you will see that our post installation configuration is now completed.
Click on Next and now you can adjust the settings just made on the Features and Plugins and Spam and Virus Scanning Pages.
You can Manage Enabled Features and Plugins by clicking on that as shown below.
![(dj384w83k02jkg8432/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/98053373.png)
HP_NO_IMG/data/uploads/users/3b85855d-36a1-4010-b06d-1cae5485254b/107791348.png” alt=”” />
Switching between Webmin and Virtualmin
Every Virtualmin system has a Webmin tab and a Virtualmin tab in the left-hand menu. (Top-Left Corner) . We can switch between Webmin menu and Virtualmin menu. let’s see some of their uses :-
Webmin provides general purpose systems management features, such as user/group management, listing processes, managing installed packages, network settings, firewall settings, and more.
Whereas the Virtualmin tab provides access to domain account management functionality, such as creating new domain accounts, new databases associated with those accounts, installing applications, and more.
Creating a Sub-Server
creating a sub server means that allowing for a second domain to be setup within a given Virtual Server account. We also recommend to create a sub server to create a sub-domain website that is owned by the parent domain.
For creating a sub server follow the instructions below carefully :-
First of all choose the domain for which you want to add the sub-server. You can do that by selecting the domain name from the drop-down box on the top-left.
After selecting the domain you have to click on Create Virtual Server.
Once a virtual server is created then click on Sub-server.
Now Enter the domain name and description for the Sub-server that you’ll be asked and finally click on Create Server.
NOTE:-
You can create a sub-server only when you are logged into the Virtualmin.
Upgrading Virtualmin
Using Virtualmin UI
Whenever a new version of Virtualmin is available you will see a message on the System Information page specifying that there are Virtualmin package updates available.
There may be some other packages listed too it depends upon what is available to be updated. To install these updates click on Install All Updates Now button.
We can also upgrade the Virtualmin using command line. To do so run following commands:
yum update
You can install some specific packages from the command line(if you want) as the ‘root’ user using this command shown below :
yum install wbm-virtual-server bind perl python
Creating an FTP Account
Follow these instructions carefully given below to create a FTP account :-
First of all choose the domain you want to add the FTP account to. You can do that simply by selecting the domain name from the drop-down box on the top-left.
After a domain is selected now click on Edit Users then you’ll to click on Add a website FTP access user (on the far-right).
After that you’ll be asked an Email address so in the Email Address, enter the name for the new FTP account and enter the FTP user’s name in the Real name field.
You can also set a password in the Password field if you want to override Virtualmin’s password that it puts there by default.
Finally click on Create button to create FTP account.
Enable shared FTP directories
To enable shared FTP directories follow given steps :-
Firstly choose the domain for which you wish to permit FTP shared directories in the domain selection dropdown.
Once the domain is selected then click on Edit Email and FTP Users.
After that create the users you want,and make sure that their ‘Login permisisons’ include FTP access, then you will see a Limits and Validation menu, so click on FTP Directory Restrictions.
Create a new access rule by checking the Active checkbox in the last rule in the list (which is a “blank” rule), and selecting the virtual server to which the rule should apply.
After that choose Virtual server’s home directory in the Restrict to directory and then finally click on Save.
After enabling sharedv FTP directories you will have read access to all directories within the virtual server home directory, and upload access within their home directory.
Conclusion
In this tutorial we have learnt how to install and use Virtualmin on CentOS . You can successfully deploy the Virtualmin after installing the required dependencies and packages.