I could not wait until the new Raspberry Pi OS with Debian 12 (Bookworm) is released and the MoodleBox comes with Moodle 4.2. This upgrade is an experiment and nobody will support such an updated MoodleBox 4.5.1. Please remember this if you try to do the same experiment.
I just installed Moodle 4.2+ (20230512) on the MoodleBox 4.5.1.
Therefore I firstly update the Raspberry Pi OS to the latest version.
sudo apt update
sudo apt upgrade
This update delivers MariaDB 10.5.19 and php7.4.33.
Now I wanted to install php8.0 but it is not part of Bullseye.
The next command lines add a new repository to /etc/apt/sources.list so Raspberry Pi can get a newer php version. You can trust the php packages of Sury (which is the official maintainer of the php package of Debian).
wget -O /tmp/php.gpg https://packages.sury.org/php/apt.gpg
sudo mv /tmp/php.gpg /etc/apt/trusted.gpg.d/
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt update
sudo apt upgrade
The next command line is installing php8.0.28 on Raspberry Pi OS (Bullseye).
sudo apt install php8.0-fpm php8.0-common php8.0-cli php8.0-mysql php8.0-curl php8.0-intl php-pear php8.0-gd php8.0-zip php8.0-xml php8.0-mbstring php8.0-soap
At last I need to change php7.4-fpm to php8.0-fpm in the nginx configuration and restart nginx.
sudo nano /etc/nginx/sites-available/default
sudo systemctl restart nginx
After all I have a MoodleBox with MariaDB 10.5.19 and php8.0.28. This server environment is enough to install Moodle 4.2 because the current Moodle does not yet need MariaDB 10.6.7 as I know from https://tracker.moodle.org/browse/MDL-74905 and my Moodle4Mac 4.2 package.
Great! It works!
