Table of Contents
In this article, I will take you through the steps to install Virtualmin on Ubuntu 20.04 LTS but before that let me ask you a question. Do you know what makes Virtualmin different from other web hosting control panels ? If you don't know then let me tell you it is the webmin which sets Virtualmin apart from other control panels by providing comprehensive System Management UI, in addition to virtual web hosting capabilities.
Virtualmin is the most popular and powerful web hosting control panel for Linux and BSD systems. It is available in an open-source community-supported version, and a more feature-filled version with premium support. We will the steps to install Virtualmin in below section. You can use either of them. More on official documentation.
How to Install Virtualmin on Ubuntu 20.04 LTS
Also Read: How to Install PostgreSQL on Ubuntu 20.04 LTS [Easy Steps]
Step 1: Prerequisites
a) You should have a running Ubuntu 20.04 LTS
Server.
b) You should have sudo
or root
access to run privileged commands.
c) You should have apt
or apt-get
utility installed in your Server.
Step 2: Update Your Server
In the first step, you need to update all your packages with the latest version available in the Ubuntu Repository. This can be easily done by using apt update
or apt-get update
command as shown below.
root@localhost:~# apt update
Hit:1 http://software.virtualmin.com/vm/6/gpl/apt virtualmin-focal InRelease
Hit:2 http://software.virtualmin.com/vm/6/gpl/apt virtualmin-universal InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:4 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:5 https://packages.microsoft.com/repos/edge stable InRelease
Hit:6 http://ppa.launchpad.net/ansible/ansible/ubuntu focal InRelease
Get:7 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Hit:8 https://apt.releases.hashicorp.com focal InRelease
Hit:9 http://ppa.launchpad.net/micahflee/ppa/ubuntu focal InRelease
Get:10 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:11 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [86.6 kB]
Get:12 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [283 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [362 kB]
Get:14 http://in.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]
Step 3: Download Virtualmin Installer
In the next step, you need to download the Virtualmin installer file by using below wget command. It will download the installer file in the current local directory path as install.sh
file.
root@localhost:~# wget https://software.virtualmin.com/gpl/scripts/install.sh
--2021-10-24 14:05:23-- https://software.virtualmin.com/gpl/scripts/install.sh
Resolving software.virtualmin.com (software.virtualmin.com)... 163.172.162.254
Connecting to software.virtualmin.com (software.virtualmin.com)|163.172.162.254|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 33073 (32K) [application/x-sh]
Saving to: ‘install.sh’
install.sh 100%[============================================================================>] 32.30K --.-KB/s in 0.1s
2021-10-24 14:05:24 (262 KB/s) - ‘install.sh’ saved [33073/33073]
Step 4: Provide Execute Permission
To run the previously downloaded install.sh file, you need to provide execute permission. This can be done by using chmod +x install.sh command.
root@localhost:~# chmod +x install.sh
Step 5: Install Virtualmin
Now you can run this installer file by using ./install.sh
to install Virtualmin and all the required packages as shown below.
root@localhost:~# ./install.sh 2021-10-24 14:06:24 URL:https://software.virtualmin.com/lib/slib.sh [22148/22148] -> "slib.sh" [1] Welcome to the Virtualmin GPL installer, version 6.2.2 This script must be run on a freshly installed supported OS. It does not perform updates or upgrades (use your system package manager) or license changes (use the "virtualmin change-license" command). The systems currently supported by install.sh are: CentOS/RHEL Linux 7, and 8 on x86_64 Debian 9, and 10 on i386 and amd64 Ubuntu 16.04 LTS, 18.04 LTS, and 20.04 LTS on i386 and amd64 If your OS/version/arch is not listed, installation will fail. More details about the systems supported by the script can be found here: https://www.virtualmin.com/os-support The selected package bundle is LAMP and the size of install is full. It will require up to 650 MB of disk space. Exit and re-run this script with --help flag to see available options. Continue? (y/n) y ............................................................................................................ ▣▣▣ Phase 3 of 3: Configuration [1/23] Configuring AWStats [ ✔ ] [2/23] Configuring Apache [ ✔ ] [3/23] Configuring Bind [ ✔ ] [4/23] Configuring ClamAV [ ✔ ] [5/23] Configuring Dovecot [ ✔ ] [6/23] Configuring Firewalld [ ✔ ] [7/23] Configuring MySQL [ ✔ ] [8/23] Configuring NTP [ ✔ ] [9/23] Configuring Net [ ✔ ] [10/23] Configuring ProFTPd [ ✔ ] [11/23] Configuring Procmail [ ✔ ] [12/23] Configuring Quotas [ ✔ ] [13/23] Configuring SASL [ ✔ ] [14/23] Configuring Shells [ ✔ ] [15/23] Configuring SpamAssassin [ ✔ ] [16/23] Configuring Status [ ✔ ] [17/23] Configuring Upgrade [ ✔ ] [18/23] Configuring Usermin [ ✔ ] [19/23] Configuring Webalizer [ ✔ ] [20/23] Configuring Webmin [ ✔ ] [21/23] Configuring Fail2banFirewalld [ ✔ ] [22/23] Configuring Postfix [ ✔ ] [23/23] Configuring Virtualmin [ ✔ ] ▣▣▣ Cleaning up [SUCCESS] Installation Complete! [SUCCESS] If there were no errors above, Virtualmin should be ready [SUCCESS] to configure at https://admin.localhost.com:10000 (or https://192.168.29.113:10000). [SUCCESS] You'll receive a security warning in your browser on your first visit.
Step 6: Allow access through Firewall
By default, Virtualmin Server will listen on Port 10000, so we need to allow this Port from firewall by using ufw allow 10000 command as shown below.
root@localhost:~# ufw allow 10000
Rules updated
Rules updated (v6)
Step 7: Open Webmin UI
As you have noticed in the earlier step, Virtualmin is currently running on https://admin.localhost.com:10000
(or https://192.168.29.113:10000
) so you need to open your favorite browser and give this URL to access the Webmin UI.
Step 8: Login to Virtualmin
You can use your local user account credentials to login to Virtualmin. For example, here I am signing in with my local cyberithub
account and password. Once signed in, you will get below Post-Installation wizard. You can either proceed to configure Virtualmin by clicking on Next
or use the default settings by Clicking on Cancel
. As of now, I am going to use the default settings so I will just Click on Cancel
. In future posts, I will show you how to configure this.
Step 9: Uninstall Virtualmin
Once everything is completed and you no longer require Virtualmin in your Server then you can completely remove this Web Hosting Control Panel Application by using ./install.sh -u
command as shown below.
root@localhost:~# ./install.sh -u 2021-10-24 23:01:51 URL:https://software.virtualmin.com/lib/slib.sh [22148/22148] -> "slib.sh" [1] WARNING This operation is very destructive. It removes nearly all of the packages installed by the Virtualmin installer. Never run this on a production system. Continue? (y/n) y Reading package lists... Done Building dependency tree Reading state information... Done Package 'virtualmin-base' is not installed, so not removed Package 'virtualmin-lemp-stack' is not installed, so not removed The following packages were automatically installed and are no longer required: awstats bind9 bind9-utils certbot clamav clamav-base clamav-daemon clamav-docs clamav-freshclam clamav-testfiles clamdscan etckeeper fonts-lato geoip-database jailkit javascript-common libalgorithm-c3-perl libapache2-mod-fcgid libauthen-oath-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libberkeleydb-perl libclamav9 libclass-c3-perl libclass-c3-xs-perl libclass-data-inheritable-perl libclass-method-modifiers-perl libclass-xsaccessor-perl libcrypt-openssl-bignum-perl libcrypt-openssl-random-perl libcrypt-openssl-rsa-perl libdata-optlist-perl ........................................................................................