Just updated our remaining couple of dozen PBXs over the holidays and thought I’d share the fairly simple script I used to do so in case it might help someone.
Our systems are all running AlmaLinux 9. If you’re running something older, the dnf commands may need to be adjusted to match your situation (e.g. using Remi’s PHP repo or Nodesource if the OS doesn’t support appropriate version.) The important thing is that, going into the FreePBX 17 install, you’re running PHP 8.2 and Node 18.
fwconsole ma upgradeall --edge
# update versions
dnf -y module switch-to php:8.2
dnf -y module switch-to nodejs:18
dnf -y update
# patch a couple of warnings that become fatal errors in PHP 8.2 and kill fwconsole
sed -i 's/implements LoggerInterface,/implements/' /var/www/html/admin/libraries/Composer/vendor/monolog/monolog/src/Monolog/Logger.php
sed -i '454i if($this->socket)' /var/www/html/admin/libraries/php-asmanager.php
# run 17 installer
fwconsole ma downloadinstall http://mirror.freepbx.org/modules/packages/freepbx/freepbx-17.0-latest-EDGE.tgz
# fix a version conflict with symfony translations
pushd /var/www/html/admin/libraries/Composer
sed -i '/"php": "8.1.0"/d' composer.json
composer -n require symfony/translation ~6.3
popd
# do this one first to avoid dependency messes
fwconsole ma upgrade backup
fwconsole ma upgradeall
# reinstall framework to revert composer changes
fwconsole ma downloadinstall framework
# start fastagi server and reload
fwconsole start
fwconsole reload
No warranties provided, with a special caveat that I’ve always installed FreePBX directly onto my own OS. I have no idea if this would work on the FreePBX distro. Always make backups and prepare for failure.
It would not. The distro (v16 or lower) is a Sangoma produced derivative of CentOS/RHEL. There is no newer version of that OS to update to. v17 is based on Debian 12.
The biggest downside of v17 is there is no in-place OS update that can be run on the older Distro releases.
This isn’t about upgrading the OS, just upgrading PHP and FreePBX.
Hence the above script, which will update your FreePBX version. There’s no need to be updating your OS all the time, and I’m certainly not interested in running Debian boxes. Glad I stayed away from the distro from the start or I’d be unhappy now!
The shift from a RHEL derivative to Debian was the only logical choice, Mike.
All Debian derivatives, including the commercial-support-available ones like Ubuntu, are synced to the master Debian distro. It is a cooperative environment. If an app developer such as someone working on Asterisk, or a developer working on Ubuntu, finds a bug in Debian then it’s patched, the patches are fed upstream and when the Debian maintainers update Debian, everyone running a downstream Debian distro benefits.
But with RHEL it’s a warzone because Red Hat is inimical to Rocky Linux, Alma Linux and every other RHEL-derived distro. That’s why they killed CentOS it’s why they killed Fedora, they simply do not want anyone making a RHEL-compliant Linux and if it wasn’t for GNU they would have done the same thing AT&T did with System V.
Red Hat has proven over and over where they stand. They took a free open source Linux, numerous open source apps like grep/sed/vi, etc., modified a small but crucial part of it so it wasn’t compatible with any other Linux, then ran around to the main hardware vendors like HP and other server-class vendors and pushed those vendors into releasing RHEL-only hardware drivers for key hardware pieces like RAID cards. They are only interested in a walled garden with everyone paying them to play with what they got for free.
There’s nothing wrong with Alma Linux, or Rocky Linux, as long as whoever runs it knows that those are islands. They have a difficult time benefiting from patches anyone else releases and fixes they make few others pay attention to or benefit from. It’s really kind of sad, but that’s the way it is and that’s why FreePBX moved to Debian from CentOS.
Nothing wrong with Debian, if that’s what you’re into. But I’ve spent the last 20 years looking after RHEL boxes; our automations, processes, and knowledge are geared towards that platform so why would I want to change?