• Get In Touch
December 26, 2016

How to Install Virtualmin on CentOS 7.0

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

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.

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]