How to install Virtualmin on Ubuntu 20.04
Virtualmin is an open-source web hosting and cloud control panel. It enables users to create multiple managed hosting environments and avoid switching to different servers. It's secure and allows access to the server via an SSL-encrypted HTTP with little technical knowledge. In this article, you will learn how to install Virtualmin Ubuntu control panel on 20.04 LTS Server.
Update the system
apt update
apt dist-upgrade
once the updates are installed, reboot the system with the command,
reboot
Once rebooted proceed with the steps below,
Add Swap
Note: This step is a must if your VPS has less than 2 GB of Memory Total (RAM + SWAP = Memory Total)
Command to create a Swap file.
Note: We are adding 1.5GB here since our test VPS has 512 MB of RAM if you want to add a different size then you can replace it in place of 1.5G
fallocate -l 1.5G /swapfile
To set write permission.[Default permissions only enable for root user]
chmod 600 /swapfile
To set up a swap area on the file.
mkswap /swapfile
To activate the swap file.
swapon /swapfile
Open the following file and add the given content to change it to permanent.
nano /etc/fstab
Add the following line.
/swapfile swap swap defaults 0 0
Now check the free -m
size.
free -m
Output:
root@vps:~# free -m
total used free shared buff/cache available
Mem: 468 143 55 0 268 304
Swap: 2047 0 2047
NOTE: Now the added swap space can be seen.
Check Swap Information (Optional)
Command to check swap size.
swapon --show
Output:
root@vps:~# swapon --show
NAME TYPE SIZE USED PRIO
/swapfile file 1.5G 441.7M -2
/dev/vda2 partition 512M 0B -3
root@vps:~#
Or you can check using the free -m
command.
free -m
Output:
root@vps:~# free -m
total used free shared buff/cache available
Mem: 468 136 21 0 309 311
Swap: 511 18 493
NOTE: If the output is empty, it means that swap space is not enabled yet on your system.
Installing Virtualmin
Use the following command to download Virtualmin,
wget https://software.virtualmin.com/gpl/scripts/install.sh
Execute the scripts
chmod +x install.sh
To install both Webmin and Virtualmin
./install.sh
Output:
root@vps:~# ./install.sh
2022-06-23 21:03:20 URL:https://software.virtualmin.com/lib/slib.sh [22709/22709] -> "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
Please enter [y] or [n]: y
[INFO] Started installation log in /root/virtualmin-install.log
Stop/Disable UFW:
ufw disabled
systemctl stop ufw
systemctl disable ufw
Accessing Virtualmin
To access Virtualmin, open the URL from your web browser: https://IP_address:10000.
Note:
When logging in for the first time, you will see an 'invalid SSL' warning.
- Simply click on the 'Advanced' tab and then 'Accept the risk and Continue'.
Login to the Webmin web interface using your root user and password.
Once you log in, you will be redirected to the Webmin dashboard.
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME
for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS