Skip to content

Instantly share code, notes, and snippets.

@jotisa
Forked from morsine/freepbxarmbian
Last active January 30, 2023 21:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jotisa/37141c914ea65ffb019eeee405922659 to your computer and use it in GitHub Desktop.
Save jotisa/37141c914ea65ffb019eeee405922659 to your computer and use it in GitHub Desktop.
How to install FreePBX 15 with Asterisk 16 on Armbian or Orange Pi
# Note: These steps worked for me, but it might not work for you. This requires changing some stuff which might break your system.
# I am not responsible for anything
# be the root user!
sudo -i
# change the sources.list file contents
# open it and remove everything inside
nano /etc/apt/sources.list
# after that add the following:
deb http://archive.raspbian.org/raspbian buster main contrib non-free
deb-src http://archive.raspbian.org/raspbian buster main contrib non-free
## didn't work, didn't edit sources.list
# I know this is for raspbian. but it will do just fine.
apt-get update && apt-get upgrade -y
apt-get install mariadb-server mariadb-client curl dirmngr apt-transport-https lsb-release ca-certificates gcc g++ wget php php-pear php-cgi php-common php-curl php-mbstring php-gd php-mysql php-php-gettext php-bcmath php-zip php-xml php-imap php-json php-snmp php-fpm libapache2-mod-php apache2 asterisk -y
# Kill asterisk using any method you use.
# asterisk -r
CLI> core stop now
# secure mysql
/usr/bin/mysql_secure_installation
# Install node.js
apt-get install curl dirmngr apt-transport-https lsb-release ca-certificates -y
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash
apt-get update
apt-get install gcc g++ make nodejs -y
# some apache configuration.. uninstall nginx or reconfigure as needed.
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 php7.4
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.4/apache2/php.ini
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.4/cli/php.ini
service apache2 restart # error when nginx present
systemctl restart apache2 # doesn't work error when nginx present
# delete everything on the web folder
rm -rf /var/www/html/*
# Install FreePBX 15 check if FreePBX 16 suits your needs
cd /usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-15.0-latest.tgz
tar xfz freepbx-15.0-latest.tgz
rm -f freepbx-15.0-latest.tgz
cd freepbx
./start_asterisk start
# Replace your SQL password with the example
./install -n --dbuser root --dbpass mysqlpassword
a2enmod rewrite
systemctl restart apache2
# Fixing possible issue with manual installations
fwconsole restart
fwconsole ma downloadinstall pm2
fwconsole restart
# reboot the system
reboot now
# if you still have issues starting freepbx, please check this link
# https://issues.freepbx.org/browse/FREEPBX-20344
@jotisa
Copy link
Author

jotisa commented Jan 29, 2023

Note if you can't get FreePBX installed just go to its uncompressed directory and execute ./install as root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment