Skip to content

Instantly share code, notes, and snippets.

@morsine
Created May 10, 2021 16:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save morsine/07afefa2c361992cf17c9d9245e7f863 to your computer and use it in GitHub Desktop.
Save morsine/07afefa2c361992cf17c9d9245e7f863 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
# 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-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.
# 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_10.x | sudo bash
apt-get update
apt-get install gcc g++ make nodejs -y
# some apache configuration..
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.3
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.3/apache2/php.ini
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.3/cli/php.ini
service apache2 restart
systemctl restart apache2
# delete everything on the web folder
rm -rf /var/www/html/*
# Install FreePBX 15
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
@vahidpourmohamad
Copy link

hello dear
is that work on orange pi pc 2? and do you use FreePBX admin web UI?

@morsine
Copy link
Author

morsine commented Dec 26, 2021

@vahidpourmohamad Hello dear Hamvatan.

The code above was tested on an Orange Pi One and Zero.
And yes, it was using FreePBX 15 for the web UI.

I'm not sure if it still works or not, considering the release of newer version of the dependencies and the OS itself.

@vahidpourmohamad
Copy link

thank you very well I will test your solution and inform you
what is your idea about asterisk performance on orange pi PC 2?

@morsine
Copy link
Author

morsine commented Dec 26, 2021

It most likely will handle 30+ concurrent calls with ease.
the only thing which could throttle it down, is the RAM.

@chuc2rk
Copy link

chuc2rk commented Jun 19, 2023

@vahidpourmohamad Hello dear Hamvatan.

The code above was tested on an Orange Pi One and Zero. And yes, it was using FreePBX 15 for the web UI.

I'm not sure if it still works or not, considering the release of newer version of the dependencies and the OS itself.

Hi! which version armbian run on your orange pi Zero?

@morsine
Copy link
Author

morsine commented Jun 20, 2023 via email

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