In this post, we will cover howĀ to Install FreePBX 16 on CentOS 7 / RHEL 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 LTS on CentOS 7 / RHEL 7 below:
Step 1: Setup Pre-requisites
Disable SELinux
setenforce 0
sudo sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/configUpdate 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-odbcStep 2: Install MariaDB Database server
FreePBX requires a database server. Run the commands below to install MariaDB database server.
curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s --
sudo yum install MariaDB-server MariaDB-client MariaDB-backupStart and enable MariaDB server service:
sudo systemctl enable --now mariadbConfirm service status
systemctl status mariadbStep 3:Ā Installing Node.js LTS
FreePBX has Node.js as a dependency, install it on your system by using our guide below:
sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install nodejs npmOnce installed, confirm version using:
$ node -v
v16.14.1Step 4: Install and configure Apache Web Server
Install httpd package using yum package manager:
sudo yum -y install httpdThen 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.confRemove default index.html page
sudo rm -f /var/www/html/index.html
sudo rm /etc/httpd/conf.d/welcome.confStart and enable httpd service
sudo systemctl enable --now httpdStep 5: Install PHP and required extensions
FreePBX is dependent on PHP, we shall install PHP 7.4 on the system. Start by enabling Remi RPM repository.
### CentOS 7 ###
sudo yum -y install epel-release yum-utils
sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
### RHEL 7 ###
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo subscription-manager repos --enable=rhel-7-server-rpms \
--enable=rhel-7-server-extras-rpms \
--enable=rhel-7-server-optional-rpmsEnable PHP 7.4 repo:
sudo yum-config-manager --disable remi-php54
sudo yum-config-manager --enable remi-php74run the following commands to install php and required extensions.
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-snmpChange php maximum file upload size:
sudo sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini
sudo sed -i 's/\(^memory_limit = \).*/\1256M/' /etc/php.iniStep 6: Install FreePBX 16 on CentOS 7 / RHEL 7
Download the latest version of FreePBX using wget or curl command.
sudo yum -y install wget
wget http://mirror.freepbx.org/modules/packages/freepbx/7.4/freepbx-16.0-latest.tgzExtract the file:
tar xfz freepbx-16.0-latest.tgz
rm -f freepbx-16.0-latest.tgzInstallĀ FreePBX on CentOS 7 / RHEL 7
cd freepbx
sudo systemctl disable --now asterisk
sudo ./start_asterisk start
sudo ./install -nIf you have a root password for database server, use:
./install -n --dbuser root --dbpass dbpasswordReplaceĀ 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 http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done
Setting specific permissions...
32451 [============================]
Finished setting permissions
Generating default configurations...
Finished generating default configurations
You have successfully installed FreePBXInstall all Freepbx modules using fwconsole command:
sudo fwconsole ma disablerepo commercial
sudo fwconsole ma installall
sudo fwconsole ma delete firewall
sudo fwconsole reload
sudo fwconsole restartRestart httpd service
sudo systemctl restart httpdIf you have an active firewalld firewall service, open http & https ports
sudo firewall-cmd --add-service={http,https} --permanent
sudo firewall-cmd --reloadYou have successfully installed FreePBX on CentOS 7 / RHEL 7.
Create a systemd unit for auto-starting the service:
sudo tee /etc/systemd/system/freepbx.service<<EOF
[Unit]
Description=FreePBX VoIP Server
After=mariadb.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/fwconsole start -q
ExecStop=/usr/sbin/fwconsole stop -q
[Install]
WantedBy=multi-user.target
EOFEnable the service to autostart
sudo systemctl daemon-reload
sudo systemctl enable freepbxStep 7: AccessĀ FreePBX 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.








































































I followed your guide but the CDR reports are empty
No user āasteriskā creation, no asterisk installation, useless article
In the beginning of our article we shared link to Asterisk 16 LTS installation guide. You must have missed it. Here is direct link https://computingforgeeks.com/how-to-install-asterisk-16-lts-on-centos-7-fedora/