5

I'm running a few Bitnami LAMP stacks and so far it's been very convenient and most things work as expected.

I've been searching for information on how to update Apache, MySQL, and PHP. They're installed in the /opt/bitnami/ directory and they don't seem to update when I run:

$ sudo apt-get update

How do you update Bitnami LAMP stacks?

Thanks in advance! :)

2 Answers 2

9

Bitnami developer here.

Please note that our applications are self-contained and that means that our applications bundle all of the libraries, databases, and runtimes required to run on any platform and they don't depends on the components that exist in your system. The way you tried to update the components doesn't work with the Bitnami stacks due to it updates the components of the system.

You will learn more about Bitnami stacks here.

If you launched a server with LAMPstack in the cloud you could launch a new server with the latest version of the stack and then migrate the data, however if you installed the stack in a local server you could install the new version of the stack and migrate the data before uninstalling the old version.

To migrate the data you will need to copy your custom files from the old version to the new one (The php files of your application if you deployed your custom php application, the configuration files of Apache if you modified it, ...) and the data of the database. To migrate the database you will need to create a backup of your databases

mysqldump -u root -p database_name > backup.sql

And restore it in the new installation

mysql -u root -p database_name < backup.sql

Please note that you will need to create that database if it's not created.

mysql -u root -p
mysql> create database database_name;
mysql> grant all privileges on database_name.* to 'bitnami'@'localhost'
identified by 'BITNAMI_USER_PASSWORD';
mysql> flush privileges;
mysql> exit;

If you also installed any of the modules that we provide you have to install them in the new installation and migrate the data of the applications. The process depends on each application.

I hope it helps. Jota

5
  • 3
    so I can not update already existing PHP installation to latest version?
    – Riken Shah
    Sep 23, 2016 at 17:14
  • 12
    But is there a simple way to run updates on an existing bitnami installation? Deploying an entirely new stack seems very heavy handed. Expecting us to migrate data, application components, plus all customizations made to the system including config files, installed packages/modules, cron jobs, etc, etc, is not always going to be a trivial operation. Jan 28, 2018 at 21:46
  • 1
    It seems the real answer is "no"
    – norcalli
    Aug 1, 2018 at 5:21
  • 4
    This seems like such a wild oversight -- Still in Dec 2020.. Basically Bitnami is ensuring that 99% of folks using the stack are probably running outdated and/or insecure components and software. It's not always a trivial task to "just spin up a whole new server" and move everything to it. If I want to update OpenSSL, instead of it being a 20 second operation it's now a 2 hour operation. Ooof. Dec 10, 2020 at 21:39
  • 3
    Bitnami still sucks in 2022. Every answer I read about upgrading the LAMP stack from Bitnami is a runaround. They never want to come right out and say that you have to spin up a new VM. Well, this is why now when I spin up a new stack, it is native and DOES NOT include Bitnami.
    – Pegues
    Sep 24, 2022 at 14:45
3

it looks like this is still the case in 2023. Spin up a whole new instance and migrate your whole stack just to update PHP? Oh dear

i'd like to hear if anyone knows of anything different, but scouring online resources it seems this answer from 2016 remains the same.

might as well ditch Bitnami fully if i'm going through all this trouble

1
  • Bitnami's stance is very inconvenient. It might work well for apps where security is not a concern or where its easy to spin up a new instance but even that takes some time to authenticate new repositories and reconfigure DNS settings. I'm in the same boat, ditching bitnami.
    – sho
    Jun 28 at 13:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.