Is it possible to install virtualmin without PHP & Mysql?

The standard LAMP install installs Linux Apache MySQL and PHP - but I don’t need MySQL and PHP, is there an option to omit those?

If I do:

sudo sh

Will it give me the option to not install PHP & MySQL, or do I need to use specific flags?

Or is it advised to install with LAMP and then simply disable PHP & MySQL (I recall there is an option to select MySQL via the initial setup wizard, but none for PHP as far as I remember).

It gives you Mariadb, not MySQL.

You will always get PHP and Mariadb. After installation you can disable Mariadb and install/enable PostgreSQL (or whatever other database you’re using, but Virtualmin only really supports PotsgreSQL, Mariadb, and MySQL…there’s a little bit of support for SQLite and Oracle via extra plugins, but it hasn’t seen maintenance in quite some time, probably needs work). Virtualmin, of course, doesn’t prevent you from using anything you want, in terms of databases, but it will only have UI support for the ones mentioned. You can pretty easily automate whatever kind of database stuff you need (like creation of databases, or whatever) via Server Templates and Pre/Post scripts, or you could make your own plugin, if you wanted more UI support.

If you are using PostgreSQL, you can install it before you run the Setup Wizard to be given options for setting it up with Virtualmin. (Or you can manually enable/configure it.)

You can also disable PHP for domains.

And, for all new domains in Server Templates.

You probably shouldn’t uninstall PHP, at least not without some testing. I think Virtualmin will detect the situation (when you run Re-Check Configuration) and deal with it appropriately, but so few people want no PHP at all that it’s probably exercising code paths that have not been tested in years.

1 Like

Thanks Joe, I will install the standard LAMP install then and disable PHP for domains (I just thought that since PHP won’t be used on this server it would be one less thing to worry about).

Also speaking of Mariadb, I think it would be great to include Postgres as part of the install too (or as an option in the installer). I don’t think I know anyone now who doesn’t use Postgres as their DB of choice (wonder if there are any official stats somewhere that could shed some light on how accurate that is).

It used to be, but it was used so rarely that we stopped doing that.

But, it’s absurdly simple to switch. It’s literally just installing the packages.

Just install the OS postgresql packages between installing Virtualmin and going through the Setup Wizard. Virtualmin will detect PostgreSQL is available and offer it as an available option.

1 Like

Yep that’s what I do - when running the initial wizard and it comes to postgres, I install it then go back to the wizard, press back, then click yes to PG.

However there are additional steps too, it will not show in webmin > servers until you first click on refresh modules - which can stump you if you’re new to VM or have forgotten.

Shouldn’t virtualmin-config-system -i PostgreSQL be run after the PostgreSQL packages are installed?

1 Like

Now that you mention it Ilia… don’t we have to install a perl module as well? Pretty sure a message displays that it (or something similar) must be installed before VM can administer PG…

Oh, maybe? I don’t remember. It’s been so long since anyone wanted to switch.

And, yes, “install the OS postgresql packages” includes installing the Perl PostgreSQL bindings, as that’ll make the Webmin module faster and able to do some stuff it can’t do otherwise.

1 Like

Webmin will offer to install it if needed when visiting PostgreSQL module’s main page.

1 Like

Yeah that’s what happens IIRC.

I think including PG as an option in the installer would be a great idea, I’m pretty sure most people use PG now from what I have read.

The PostgreSQL plugin in virtualmin-config just does initialization, but that probably does need to happen for the wizard to be able to set it up easily.

So, yeah, I guess it’s actually:

  1. Install Virtualmin. Don’t run through the Setup Wizard yet.
  2. Install postgresql packages from your OS repo, including the Perl postgresql DBD module (this is named differently on various OSes, the actual module name is DBD::Pg).
  3. Run the setup wizard.
  4. Run virtualmin config-system --include PostgreSQL.
  5. Optionally disable Mariadb and uninstall it. We don’t depend on it, and I don’t think anything else in the default stack depends on it, though many Install Scripts do.
1 Like

What does that do Joe?

I am pretty sure I just did the following and it seems to be working fine:

  • Pause when running the initial wizard when it comes to postgres, install PG then go back to the wizard, press back, then click yes to PG.
  • Webmin > refresh modules
  • Webmin > servers > PG > then click on install for the perl module

As I said, “It just does initialization.” You can also do it by visiting the PostgreSQL module in Webmin.

1 Like