3

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.

Check12
  • 133
  • 1
  • 4
  • 8
    We wouldn't install phpMyAdmin at all! – Michael Hampton Dec 29 '13 at 20:28
  • 2
    I'm just curious - why do you think you need this software? Having it on your system just introduces additional attack vectors, additional software you need to keep up to date, etc. There are plenty of very good *local* MySQL clients you can run and connect via an SSH tunnel, any of which would be able to do everything PHPMA does and more, while being **much** more secure to use. – EEAA Dec 29 '13 at 21:34
  • @EEAA, perhaps I don't need it. You do make some good points. I will hold off installing phpMyAdmin and look for a suitable client I can run locally. Do you have any recommendations? Thank you for the feedback. – Check12 Dec 29 '13 at 23:47
  • For OSX, Sequel Plus is amazing. For windows, there are a lot of recommendations [here](http://stackoverflow.com/questions/9185/what-is-the-best-mysql-client-application-for-windows). – EEAA Dec 30 '13 at 00:27
  • 1
    See http://stackoverflow.com/a/34797597/763419 phpmyadmin requires a web server and php. If, as I had, you already have nginx and php7, using the Dotdeb repositories, install php5-fpm – which won't cause any harm as it's a different socket to php7, just turn it off – and all the apache2 packages will be dropped. (I've verified this works.) It'll still ask you if you want to configure apache or httpd during the install process, and you'll still need to do the DB setup, obviously. – William Turrell Mar 07 '16 at 13:04

1 Answers1

10

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).

Dennis Kaarsemaker
  • 19,277
  • 2
  • 44
  • 70
  • Meh. Debian's history with languages that have their own package management system had been problematic (c.f. cpan, pear, gem, asdf...) I think it's pretty widely and wisely advised that you roll your own stack for whatever you actually do, and let packages handle everything else. – Bandrami Dec 29 '13 at 21:49
  • 1
    Even if you were to roll you're own stack, there's no reason not to use the same packaging system as your OS uses. Makes your puppet/chef/bcfg2 setup easier too :) – Dennis Kaarsemaker Dec 29 '13 at 22:03
  • Oh, sure, use your platform's packaging tools (the other way lies madness); I just meant the only way to keep getting a reliably consistent build is to be the one doing the building. – Bandrami Dec 29 '13 at 22:07
  • 1
    That does require you to keep tabs on all software you package. I like being able to rely on vendors for security updates. It's all a matter of balancing the needs. – Dennis Kaarsemaker Dec 29 '13 at 22:09
  • @DennisKaarsemaker, when you refer to "Vendor-provided packages" are you talking about the Linux distribution's default package source list? Many thanks. – Check12 Dec 30 '13 at 00:03
  • 1
    Yes, so in your case Debian's packages. – Dennis Kaarsemaker Dec 30 '13 at 07:37
  • 2
    `--no-install-recommends` made no difference to the package list for me (Debian Jessie), but see my comment on the question itself as to how installing *php5-fpm* is enough. – William Turrell Mar 07 '16 at 13:05