How to Install FreePBX 14 on Ubuntu 18.04 In Few Steps

This guide will show you how to how to install FreePBX 14 on Ubuntu 18.04 PHP 7.2 or LAMP server In Few Steps.

Assuming you have installed and configured your LAMP server and ready to install FreePBX 14.  Follow this how to install FreePBX 14 on Ubuntu 18.04 tutorial or simply copy and paste the command listed in the steps, and sit back relax.

Option A: Step by Step

  • sudo -i
  • apt update -y
  • apt upgrade -y
  • apt install software-properties-common -y
  • add-apt-repository ppa:ondrej/php
  • Press enter when asked
  • add-apt-repository ppa:ondrej/apache2
  • Press enter when asked
  • apt update
  • apt install apache2 php5.6 php5.6-mysql php5.6-xml php5.6-curl php-xml php-mysql php-mbstring php-pear asterisk asterisk-config asterisk-core-sounds-en asterisk-dahdi asterisk-modules asterisk-mp3 asterisk-mysql asterisk-voicemail python-asterisk mysql-server -y

Do not set MySQL root password now. Leave it black. You can set it up later time.

  • cd /usr/src
  • wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-14.0-latest.tgz
  • tar -xvf freepbx-14.0-latest.tgz
  • cd freepbx
  • ./install -n
  • chown asterisk:asterisk /var/lib/php/sessions -R
  • chown asterisk:asterisk /etc/freepbx.conf
  • sed -i 's/www-data/asterisk/g' /etc/apache2/envvars
  • sed -i 's/ each(/ @each(/' /usr/share/php/Console/Getopt.php
  • sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/5.6/apache2/php.ini
  • sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
  • a2dismod php7.2
  • a2enmod rewrite
  • a2enmod php5.6
  • systemctl restart apache2
  • Open a browser and your FreePBX 14 will be available at

If you encounter the following error while applying config

Install Asterisk 13 on Ubuntu 18.04 In Few Steps

exit: 1
Unable to continue. The each() function is deprecated. This message will be suppressed on further calls in /usr/share/php/Console/Getopt.php on line 135
#0 [internal function]: Whoops\Run->handleError(8192, 'The each() func...', '/usr/share/php/...', 135, Array)
#1 /usr/share/php/Console/Getopt.php(135): each(Array)
#2 /usr/share/php/Console/Getopt.php(91): Console_Getopt::doGetopt(1, Array, 'h?u:p:', Array, false)
#3 /var/lib/asterisk/bin/retrieve_conf(453): Console_Getopt::getopt(Array, 'h?u:p:', Array)
#4 {main}

Option B: Alternate

apt install software-properties-common -y
add-apt-repository ppa:ondrej/php
add-apt-repository ppa:ondrej/apache2
apt update
apt install apache2 php5.6 php5.6-mysql php5.6-xml php5.6-curl php-xml php-mysql php-mbstring php-pear asterisk asterisk-config asterisk-core-sounds-en asterisk-dahdi asterisk-modules asterisk-mp3 asterisk-mysql asterisk-voicemail python-asterisk mysql-server -y && cd /usr/src && wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-14.0-latest.tgz && tar -xvf freepbx-14.0-latest.tgz && cd freepbx && ./install -n && chown asterisk:asterisk /var/lib/php/sessions -R && chown asterisk:asterisk /etc/freepbx.conf && sed -i 's/www-data/asterisk/g' /etc/apache2/envvars && sed -i 's/ each(/ @each(/' /usr/share/php/Console/Getopt.php && sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/5.6/apache2/php.ini && sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf && a2dismod php7.2 && a2enmod rewrite && a2enmod php5.6 && systemctl restart apache2 -y
cd /usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-14.0-latest.tgz
tar -xvf freepbx-14.0-latest.tgz
cd freepbx
./install -n
chown asterisk:asterisk /var/lib/php/sessions -R
chown asterisk:asterisk /etc/freepbx.conf
sed -i 's/www-data/asterisk/g' /etc/apache2/envvars
sed -i 's/ each(/ @each(/' /usr/share/php/Console/Getopt.php
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/5.6/apache2/php.ini
sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
a2enmod rewrite
a2enmod php5.6
systemctl restart apache2

Check out other tutorials at the blog section. Contact us for 1 hour of free support.

 

Leave a Reply

Your email address will not be published. Required fields are marked *