New virtualmin-lamp-stack and virtualmin-lemp-stack metapackages for Debian/Ubuntu

5 posts / 0 new
Last post
#1 Thu, 09/28/2017 - 05:22
Joe
Joe's picture

New virtualmin-lamp-stack and virtualmin-lemp-stack metapackages for Debian/Ubuntu

Howdy all,

I've rolled out new metapackages for Debian and Ubuntu. These packages specify the dependencies when installing the Virtualmin stack on Debian or Ubuntu.

Changes since the 6.0.7/6.0.8 release:

  • Minimal stack has added dovecot and sasl dependencies
  • Minimal stack has removed fail2ban dependency

This won't make any difference for existing systems, generally speaking, though it will install Dovecot and SASL if they aren't already installed. If you want to use them, you'll still need to configure them with virtualmin config-system --include Postfix SASL Dovecot.

Let me know if you run into any problems.

Cheers,

Joe

Thu, 09/28/2017 - 05:37
Joe
Joe's picture

Note these changes only apply to systems installed with version 6.0.x of install.sh. Older systems didn't use metapackages to handle dependency installation.

--

Check out the forum guidelines!

Wed, 02/06/2019 - 12:38
ADDISON74

It is good to know but how can we remove a package without removing the whole virtualmin-lamp-stack package?

For example, in Debian 8 Virtualmin is installing PHP versions 5.6, 7.0, 7.1, 7.2 from sury repository. When I would like to remove 5.6 and 7.0 the whole virtualmin-lamp-stack will be removed too (apache2, mysql, ...). So, I tried this command "dpkg -r --force-depends php5.6" and I successfully remove only the package, but when I use apt command it will force me to put it back because virtualmin-lamp-stack needs it . Recommended command was "apt-get install -f". Running it will reinstall all php5.6-* removed before.

I went further using marking hold all packages installed by virtualmin-lamp-stack according to the information from virtualmin-install.log file with command "apt-mark unhold package_name". No luck virtualmin wants back the php5.6-*. I ran command "update-alternative --config php" in order to set default php version to 7.2. I removed php 5.6 then again I was forced to put it back.

If I would like to replace MariaDB with Percona I cannot because virtualmin-lamp-stack will be removed too. The only solution is installing Percona before Virtualmin.

Why virtualmin-lamp-stack depends on packages we should be able to remove or replace? Do you have a solution to remove/replace a package installed by virtualmin-lamp-stack without removing it?

Thu, 02/07/2019 - 00:47 (Reply to #3)
Joe
Joe's picture

MariaDB is not depended on, it is a "Recommends", isn't it? There's nothing preventing you from installing a different MySQL/MariaDB version, as far as I know. Recommended packages are not hard dependencies.

https://github.com/virtualmin/virtualmin-lamp-stack-deb/blob/master/virt...

There may be other dependencies that stack up to lead to what you're seeing, but it's not the virtualmin-lamp-stack doing it directly. I don't have any experience with Percona packages, so I can't really make suggestions. Presumably they would satisfy whatever dependencies the other packages need.

The PHP packages are depended on, but, I'll move some of them down into Recommends in Virtualmin 7. It was common for some older PHP version to be available for a lot of Install Scripts. But, in hindsight, it was probably unnecessary to make them hard dependencies, so I'll back off of that for the next major version.

Do you have a solution to remove/replace a package installed by virtualmin-lamp-stack without removing it?

The MySQL thing should Just Work. I'd need to see the whole message from apt...it's not because of virtualmin-lamp-stack, directly, so it must be some other part of the stack that's depending on MySQL parts. You should probably be able to just cross-grade.

Generally, the aim of the virtualmin-lamp-stack was to allow you to replace most components without a major hassle...I guess I missed the mark on a couple of them.

--

Check out the forum guidelines!

Thu, 02/07/2019 - 07:55
ADDISON74

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