MariaDB is replacing Oracle MySQL Server starting with Debian 9 and Virtualmin is installing this package with virtualmin-lamp-stack. Percona Mysql Server in my opinion is the best Oracle MySQL alternative, more performance thanks to XtraDB pack which helps Magento 1&2 (based on intensive tests). Percona is able to remove any mysql server/client and replaces it without any issues. Details how simple it is are here: https://www.percona.com/doc/percona-server/5.7/installation/apt_repo.html.
If MariaDB is installed manually before and you want to replace it with Percona following the steps from the above link it will work smooth. This is not happening after Virtualmin is installing virtualmin-lamp-stack where a step is installing MariaDB. Percona wants to remove virtualmin-lamp-stack together with mysql package (it doesn’t see it as mariadb - just mysql). As a solution I installed Percona Server first, before Virtualmin. Virtualmin detected a mysql server installed and left it as it was.
As I see virtualmin-lamp-stack in Debian 8 is able to add sury repository and install PHP 7.0, 7.1, 7.2 versions along with default PHP 5.6. This is fine in my opinion. When you want removing any of these versions you won’t succeed (except 5.6 installed before from Debian repo). Uninstaller says virtualmin-lamp-stack will be removed too. I managed to remove in testing PHP 7.0 version only (see the post above for command) but later after I was forced to reinstall it because I got a message to complete the installation for a missing package by using “apt-get install -f” command. Virtualmin-lamp-stack requested it.
I agree some PHP versions should not be marked as hard dependencies. Older versions of php like 5.5/5.6 are still needed for online stores like X-Cart 4, Magento 1, but anyone should be able to remove them. It is obviously some packages are marked as hard dependencies and need revise one by one asap. In my opinion mysql, fail2ban, firewalld, php versions should be removed or replaced without affecting virtualmin-lamp-stack plugin functionality. LAMP means a combination of web server + database server + php interpreter. Any of these part should be replaced after easy. Not making a replacement depending of apache 2.4, mariadb 10.1, php7.0 as package names.
An important issue in virtualmin-lamp-stack plugin installation is related to fail2ban. If this service is not enable you won’t succeed Virtualmin installation. At step [21/23] Configuring Fail2banFirewalld it will fail with an error. Your script is looking if fail2ban service is enable and this is the source of trouble. I recommended a new step in Phase 3 - Configuring Fail2ban in order to unmask&enable&start this service if it was before, as you do usually in Configuring Firewalld step.
Reported issue here: https://www.virtualmin.com/node/64425
Reported issue here: https://www.virtualmin.com/node/64584
Also there is an issue when re-configuring Virtualmin plugin, there are some strange evaluation in if’s statements. Reported here: https://www.virtualmin.com/node/64583