[TUT] How to install Virtualmin with Nginx and MariaDB latest version in Ubuntu 20.04 LTS

Hi guys,
I am new to Virtualmin, here I would like to share how I installed Virtualmin together with Nginx (latest version) and MariaDB (latest version). After many failed installs, I finally made it!

  • Ubuntu 20.04 LTS
  • Webmin: 1.994
  • Virtualmin: 7.1
  • Nginx: 1.21.6 (or 1.22.0)
  • MariaDB: 10.8.3
  • PostgreSQL: 14 (or 15)
  • Multiple PHP Versions (7.4.30, 8.0.20, 8.1.7)

1. Install latest MariaDB

sudo apt update && sudo apt upgrade
sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
sudo add-apt-repository 'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.8/ubuntu focal main'
sudo apt update
sudo apt install mariadb-server mariadb-client mariadb-backup mariadb-common

2. Make Virtualmin install the latest stable version of Nginx in Ubuntu (nginx-mainline)

sudo add-apt-repository ppa:ondrej/nginx-mainline -y
sudo apt update

3. Install Virtualmin with Nginx

wget https://software.virtualmin.com/gpl/scripts/install.sh
sudo /bin/sh install.sh --bundle LEMP

4. MariaDB will be have status “failed” when Virtualmin install successfully, so we need remove all mysql-* and reinstall MariaDB

sudo apt remove mysql-*
sudo apt install mariadb-server mariadb-client mariadb-backup mariadb-common

5. Install PostgreSQL 14 for Ubuntu

sudo apt update && sudo apt upgrade
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt -y update
sudo apt -y install postgresql-14

6. Virtualmin Multiple PHP versions

add-apt-repository ppa:ondrej/php && apt-get update
apt-get install php8.0-{cli,pdo,fpm,zip,gd,xml,mysql,cgi}
apt-get install php8.1-{cli,pdo,fpm,zip,gd,xml,mysql,cgi}

Then, go to Virtualmin > System SettingsRe-Check Config

Now, You will have Virtualmin running with Nginx (latest version) and MariaDB (latest version).

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.