How to Install FreePBX 15 on CentOS 7

(: November 27, 2018)

In this post, we will cover how to Install FreePBX 15 on CentOS 7. FreePBX is an open source GUI tool for administering Asterisk PBX systems. FreePBX is written in PHP and available for both Red Hat and Debian Linux family.

This setup assumes you already have a working Asterisk Server. We have a guide for installing Asterisk 16 LTS on CentOS 7 below:

How to Install Asterisk 16 LTS on CentOS 7 / Fedora{text-align:left} img{margin:0 auto 0 0}

Step 1:  Prerequisites

Disable SELinux

setenforce 0
sudo sed -i 's/(^SELINUX=).*/SELINUX=disabled/' /etc/selinux/config

Update CentOS system and Install Development Tools.

sudo yum -y update
sudo yum -y groupinstall  "Development Tools"

Install other required dependencies:

sudo yum -y install lynx tftp-server ncurses-devel sendmail sendmail-cf sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion kernel-devel git crontabs cronie cronie-anacron wget vim php-xml uuid-devel sqlite-devel net-tools gnutls-devel unixODBC mysql-connector-odbc

Step 2:  Install MariaDB Database server:

FreePBX requires a database server. Use the guide on the link below to install and configure MariaDB Database server on CentOS 7.

Install MariaDB 10.x on Ubuntu 18.04 and CentOS 7

Step 3: Installing Node.js 10 LTS

FreePBX has Node.js as a dependency, install it on your system by using our guide below:

Installing Node.js 10 LTS on CentOS 7 / Fedora 29 / Fedora 28

Once installed, confirm version using:

$ node -v

Step 4: Install and configure Apache Web Server

Install httpd package using yum package manager:

sudo yum -y install httpd

Then change Apache user to asterisk and turn on AllowOverride option :

sudo cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_orig
sudo sed -i 's/^(User|Group).*/1 asterisk/' /etc/httpd/conf/httpd.conf
sudo sed -i 's/AllowOverride None/AllowOverride All/' /etc/httpd/conf/httpd.conf

Remove default index.html page

sudo rm -f /var/www/html/index.html

Step 5: Install PHP and required extensions

FreePBX is dependent on PHP, run the following commands to install php and required extensions.

sudo yum -y install epel-release
sudo yum -y install 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-process php-snmp
Change php maximum file upload size:
sudo sed -i 's/(^upload_max_filesize = ).*/120M/' /etc/php.ini

Step 6: Download and Install FreePBX 15 on Ubuntu 18.04 / 16.04 / Debian 9

Download the latest version of FreePBX 15:

sudo yum -y install wget

Extract the file:

tar xfz freepbx-15.0-latest.tgz
rm -f freepbx-15.0-latest.tgz

Install FreePBX 15 on CentOS 7

cd freepbx
sudo ./start_asterisk start
sudo ./install -n

If you have a root password for database server, use:

./install -n --dbuser root --dbpass password

Replace password with the root database password.

Sample installation output:

Done. All modules installed.
Updating Hooks...Done
Done installing modules
Taking too long? Customize the chown command, See
Setting Permissions...
Setting base permissions...Done
Setting specific permissions...
32451 [============================]
Finished setting permissions
Generating default configurations...
Finished generating default configurations
You have successfully installed FreePBX

Start  and enable httpd service.

sudo systemctl start httpd
sudo systemctl enable httpd

If you have an active firewalld firewall service, open http & https ports

sudo firewall-cmd --add-service={http,https} --permanent
sudo firewall-cmd --reload

You have successfully installed FreePBX 15 on CentOS 7.

Step 7: Access FreePBX 15 Web Interface

Open your web browser and connect to the IP address or hostname of your new FreePBX server.

1. Create the first admin account

When done providing admin user details, click “Create Account” to create the account. On the next page, you’ll get a login console.

You’ll get to FreePBX dashboard where you can manage your Asterisk PBX.

You should now have FreePBX 15 running on your CentOS 7 server. Visit our VOIP pae{text-align:left} img{margin:0 auto 0 0}

Related Posts