Linux – Using APT how can I install phpMyAdmin without ‘apache2’ and all of the other gumpf

aptlinuxpackage-management

I have found that a lot of packages that get installed with APT tend to have many extra packages that get installed, but I am no sys-admin so I generally accept this.

As I start to get to grips with my VPS and Debian, I am beginning to pay more attention to what gets installed and why.

I recently compiled Nginx from source for the first time, instead of installing Apache using APT – this was recommended in the document I was reading.

To the sys-admin folk out there:

For minimal installs, do you generally compile/and or install stack components manually? Is using packages out of the question?

And my main question:

How should I go about maintaining a minimal phpMyAdmin install on my LEMP stack?

Happy New Year.

Best Answer

The phpmyadmin package doesn't have a hard dependency on apache, but it's in the 'Recommends:' line. So the main answer is to not honor these Recommends when installing phpmyadmin:

sudo apt-get --no-install-recommends install phpmyadmin

And your side question: for repeatability, I always use packages. Vendor-provided packages where possible (CentOS in our case), but if I must patch things, or if the software isn't packaged, I will create my own packages (we have ~1500 custom packages, mostly CPAN modules).