Unattended LAMP installation

Keywords: LAMP/MAMP/WAMP - Installers - How to - Upgrade

Description:
I often create new (Lightsail) instances and upgrade the LAMP stack (from 7.4 to 8). Doing this manually is starting to become troublesome.

The first thing I want to automate is the installer. I searched for a documentation on the unattended installation, but could not find one. Tried the --help command, but that also didn’t help. Is it possible to do the installation silently? I do not want to repeat the inputs to Varnish, Zend, …, install_dir, etc. every time I upgrade.

Now that I notice, what I did was installer --help, and I got -bash: installer.run: command not found.

If I do ./installer.run --help, I get the parameters list. While this helps, I suppose it’d be nice to have the same list online too.

What else do I need to add to the unattended code to match it to the following manual installation?

sudo ./installer.run --mode unattended --enable-components phpmyadmin

Manual installation:

----------------------------------------------------------------------------
Welcome to the LAMP packaged by Bitnami Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want 
to install. Click Next when you are ready to continue.
Varnish [Y/n] :n
Zend Framework [Y/n] :n
Symfony [Y/n] :n
CodeIgniter [Y/n] :n
CakePHP [Y/n] :n
Smarty [Y/n] :n
Laravel [Y/n] :n
PhpMyAdmin : Y (Cannot be edited)
Is the selection above correct? [Y/n]: y
--------------------------------------------------------------------------
Installation folder
Please, choose a folder to install LAMP packaged by Bitnami
Select a folder [/opt/lampstack-8.0.20-0]: /opt/bitnami
----------------------------------------------------------------------------
Create MySQL 'root' Account
LAMP packaged by Bitnami database root user creation
Password :
Re-enter :
----------------------------------------------------------------------------
Setup is now ready to begin installing LAMP packaged by Bitnami on your 
computer.
Do you want to continue? [Y/n]: y
----------------------------------------------------------------------------
Please wait while Setup installs LAMP packaged by Bitnami on your computer.
 Installing
 0% ______________ 50% ______________ 100%
 #########################################
----------------------------------------------------------------------------
Setup has finished installing LAMP packaged by Bitnami on your computer.
Launch LAMP packaged by Bitnami [Y/n]: y

The missing parts (that I notice) are the Installation folder and the MySQL account. I’m not sure which parameters correspond to these.