How to update Bitnami LAMP stack?
Asked Answered
B

3

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! :)

Baywood answered 12/1, 2016 at 16:3 Comment(0)
S
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

Stephniestepladder answered 13/1, 2016 at 21:56 Comment(5)
so I can not update already existing PHP installation to latest version?Turgeon
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.Nollie
It seems the real answer is "no"Suki
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.Muzhik
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.Hauser
U
8

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

Uno answered 14/6, 2023 at 11:22 Comment(2)
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.Mechanotherapy
Did you get an updated answer?Zoezoeller
M
0

As of 2nd April 2024 the task of spinning up a new instance and migrating your Wordpress install still appears to be the requirement.

Amazon Q—their new AI help bot—doesn't appear to know this though and suggest using the Bitnami Console. The link actually takes you to the AWS Console home. The other options it suggested were to Deploy from a lightsail blueprint and some unavailable options via the command line.

Screenshot of Amazon Q chatbot discussion

Multilingual answered 2/4 at 13:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.