The forum only allows a few file types so change the .txt to a .sh then chmod +x and run with ./fpbx_ast16.sh . I'm also quoting the raw at the bottom of this.
Anyone, feel free to give me a call so I can test this out or let me know if you got it working! (On or after 2/13/22, I'm leaving for a work trip in a few hours.)
-Adam, K4SPB
Meshphone 817-5309
#!/bin/bash
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ bullseye main" > /etc/apt/sources.list.d/php.list
curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt install asterisk apache2 libapache2-mod-fcgid build-essential openssh-server apache2 mariadb-server mariadb-client bison flex php7.4 php7.4-curl php7.4-cli php7.4-pdo php7.4-mysql php7.4-mbstring php7.4-xml curl sox libncurses5-dev libssl-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool autoconf git unixodbc-dev uuid uuid-dev libasound2-dev libogg-dev libvorbis-dev libicu-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp2-dev libspandsp-dev sudo subversion libtool-bin python-dev unixodbc dirmngr sendmail nodejs
systemctl stop asterisk
rm -rf /etc/asterisk
mkdir /etc/asterisk
touch /etc/asterisk/{modules,cdr}.conf
chown asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /usr/lib/asterisk
rm -rf /var/www/html
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.0/apache2/php.ini
cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig
sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
a2enmod rewrite
service apache2 restart
cd /usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-16.0-latest.tgz
tar vxfz freepbx-16.0-latest.tgz
rm -f freepbx-16.0-latest.tgz
cd freepbx
./start_asterisk start
./install -n
Success.
Looks like Asterisk 16 and FreePBX 16.
I swapped in a SSD for '/' and increased the Swap file to 2X RAM.
Thanks.
Chuck