How to Install Virtualmin?
Virtualmin is a powerful and flexible web hosting control panel for Linux and BSD systems. Virtualmin is the cost-effective and comprehensive solution to virtual web hosting management. It’s available in an Open Source community-supported version and a more feature-filled version with premium support.
- A fresh and minimal installation of the supported Operating systems: CentOS 7, CentOS 8, Debian 10, Debian 11, Ubuntu 20, and Ubuntu 22.
- The minimum required RAM is 512 MB, but this requires that you configure Virtualmin to its basic setup and sacrifice a lot of features that use RAM. This is why we recommend having 2 GB RAM for a single website and 4 GB RAM for multiple websites.
- A Minimum of 1 GB of free disk space for the installation.
How to Install Virtualmin on CentOS, Debian, Ubuntu
First, we need to install the latest updates (if there are any).
On CentOS type in the following command:
# yum update
On Debian and Ubuntu, you can type in the following command:
# apt update && apt upgrade
If there are Packages for Install or upgrade, you will be asked whether you want to download them. If so, type y and hit enter.
Once all packages are updated, we need to install the wget utility by issuing the following command for CentOS:
# yum install wget
Or the following command for Debian and Ubuntu:
# apt install wget
If the OS does not have it pre-installed, you will be asked to confirm the download of the updates. Type y for yes, and hit enter.
Before starting with the Virtualmin installation, we strongly recommend that you run the Virtualmin installer in screen mode if you are doing it with SSH because it takes between 15 to 30 minutes to complete the installation, depending on your server resources and bandwidth speed.
We need to Install
screen utility so we can run the Virtualmin installation in the background, even if we are disconnected from the server for some unforeseen reason.
You can install screen by issuing the following command on CentOS:
# yum install screen
Or, if you want to install screen on Debian or Ubuntu, you can use the following command:
# apt install screen
If the OS does not have a pre-installed screen, you will be asked to confirm the download of the updates. Type y for yes.
When the screen utility is installed, you can enter the screen command to open a new screen.
On CentOS, the screen will be opened right away. But you’ll need to confirm the command on Debian and Ubuntu by hitting Enter. So now that you have opened a new screen and are prepared for the installation, installing Virtualmin is easy. We can download the Virtualmin install script file simply by entering the following line of command code:
# wget http://software.virtualmin.com/gpl/scripts/install.sh
Next, you need to Execute the downloaded install script using a command like the following:
# /bin/sh install.sh
You will be asked if you want to install the LAMP bundle. You need to type y and hit enter.
If your hostname is not fully qualified, as in the example (srv.example.com), you will need to type in a fully qualified one and hit enter.
When the installation finishes, you will see an output similar to the one below 👇
[SUCCESS] Installation Complete! [SUCCESS] If there were no errors above, Virtualmin should be ready [SUCCESS] to configure at https://srv.blackhost.guide:10000 (or https://xxx.xxx.xxx.xxx:10000). [SUCCESS] You'll receive a security warning in your browser on your first visit.
Congratulations, you’ve successfully installed Virtualmin. We’ll move on to the next section, where we’ll talk about the first Virtualmin login.
First Login on Virtualmin
You can now log in to Virtualmin on a browser. Virtualmin runs on port 10000.
For the first time, you can now connect to your system with an URL from your IP and the port as shown below:
The browser will open a page saying, “Your connection is not private”. That is because you cannot enable SSL for an IP.
If you are using a Windows OS, you can simply click on the Advanced button and then click on the link Proceed to xxx.xxx.xxx.xxx (unsafe). You can now see the Virtualmin login page.
If you are using a Mac, you can click on the Advanced button and then, without clicking anywhere, just type on your keyboard the phrase
thisisunsafe. This will tell your browser that you are aware of the danger ahead and wish to proceed. Now you can see the Virtualmin login page.
The username is root. You will need to use the server’s root password as the password. The control panel’s password is tied to the server’s password. So whenever you change the root password, the Virtualmin password will also be changed.
It will then walk you through a post-installation setup wizard, asking you a series of setup questions.
The final step in the installation is to perform the configuration check by clicking the Check Configuration button at the top of the Virtualmin System Information page.
When you have created your first Virtual server/website or subserver and enabled SSL on it, then you can start using that website’s domain for the control panel login URL as the examples below: