Skip to content

Instantly share code, notes, and snippets.

@jotisa
Last active December 28, 2024 08:32
Show Gist options
  • Save jotisa/3445d9005ee878ba69b879ce06757fc9 to your computer and use it in GitHub Desktop.
Save jotisa/3445d9005ee878ba69b879ce06757fc9 to your computer and use it in GitHub Desktop.
FreePBX 16 installation on an armbianOS
# 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 16
cd /usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-16.0-latest.tgz
tar xfz freepbx-16.0-latest.tgz
rm -f freepbx-16.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
# Ugrade and update all packages on the system including FreePBX.
apt update
apt upgrade
# For FreePBX go to its console at yourip. Ex.:
# On your browser goto:
https://192.168.1.10
# Click FreePBX Administration.
# Put your username and password and continue.
# You will see the dashboard click Updates @ Admin tab or search for it under the magnifying-glass icon.
# Then goto the Module Updates tab
# And follow on screen cues for installing, downloading and upgrading or removing the item. After clicking:
# You have to click Process button.
# You are almost than after confirming your actions click return &
# Apply Config red button at top ribbon on the right side of the window. If there are no updates press Check Online's green button.
# Wait for it to reload...
@jotisa
Copy link
Author

jotisa commented Feb 9, 2023

you might need to compile libmaodbc.so if the package is not available in your distro repos.

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