How to install FreePBX on Centos 8

FreePBX is a free, secure and secure application that manages VoIP (Voice over IP) services and acts as a phone to a server. FreePBX undergoes a quality assurance check by Sangoma and offers flexibility and scalability to help meet your needs. regardless of their needs. Many VoIP services may require license agreements, but FreePBX does not.

Using FreePBX allows for customization through any number of extensions, users, IVRs, and queues that can meet the needs of the tasks at hand. In addition, a robust open source community provides support in the form of webinars, forums, a Full setup and troubleshooting from WIKI and PRO-TIP videos. Request features and submit bug reports seeing immediate results.

FreePBX Requirements

You can install FreePBX on various operating systems. However, the following instructions have installed on CENTOS 8. A VPS or dedicated server with root access is required and a form of lamp (Linux, Apache, MongoDB, PHP) is required.

FreePBX Preparation

Before installing FreePBX, you will first need to prepare the following on your server by logging in to your server via SSH.

Check that SELINUX is disabled

Step 1: Use the following command to make sure SELINUX is disabled.

sestatus

If SELINUX is enabled, run the following commands to disable it

sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/sysconfig/selinux

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

Then reboot, and check the status of SELINUX by running 'Sestatus'. It should say:

SELinux status: disabled

Step 2 – Before starting the additional installation, make sure your operating system is up to date by running the following command

sudo dnf -y update

Install dependencies

Step 1: Install development tools.

dnf -y group install "Development Tools."

Step 2: Create a new user called "asterisk"

adduser asterisk -m -c "Asterisk User"

Step 3: Install additional required dependencies

Enable Power Tools

dnf config-manager --set-enabled powertools

Install dependencies

dnf -y install lynx tftp-server unixODBC mariadb-server mariadb httpd ncurses-devel sendmail sendmail-cf newt-devel libxml2-devel libtiff-devel gtk2-devel subversion git wget vim uuid-devel sqlite-devel net-tools gnutls-devel texinfo libuuid-devel libedit-devel

Disable PowerTools

dnf config-manager --set-disabled powertools

Step 4: Install the MySQL 8.0.2 ODBC Connector

dnf install -y https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-8.0.21-1.el8.x86_64.rpm

dnf install -y epel-release

dnf install -y libid3tag

dnf install -y https://forensics.cert.org/cert-forensics-tools-release-el8.rpm

dnf --enablerepo=forensics install -y sox

dnf install -y audiofile-devel

dnf install -y python3-devel

Step 5: Install php7.2

dnf remove php*

dnf install -y php php-pdo php-mysqlnd php-mbstring php-pear php-process php-xml php-opcache php-ldap php-intl php-soap php-json

Step 6 : Install nodejs version 12

dnf module enable nodejs:12 -y

dnf install -y nodejs

Install and configure MariaDB

Step 1 : Enable and start Mariadb

systemctl enable mariadb.service

systemctl start mariadb

Step 2 : Secure the Mariadb installation.

The prompt will ask for your current root password. Since you just installed MySQL, you won't have a setup, so leave it blank by pressing ENTER. Then the prompt will ask if you want to set a root password. Do not set a root password .We secure the database automatically as part of the install script. You can choose YES for the rest to remove some sample and database users, disable remote logins, and load these new rules.

mysql_secure_installation

Enable and start Apache Web Server

Step 1: Run the following commands to enable and start the Apache web server

systemctl enable httpd.service

systemctl start httpd.service

Step 2 : Check the status of the Apache service

systemctl status httpd.service

Install pear legacy requirements

Run the following command to install legacy pear

pear install Console_Getopt

Download and install asterisk

Step 1: Download asterisk source files

cd /usr/src

wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz

Step 2: Extract your drupal download.

tar xvfz asterisk-16-current.tar.gz

Step 3: Remove the tar file

rm -f asterisk-*-current.tar.gz

Compile and install asterisk

Step 1: Go

cd asterisk-*

contrib/scripts/install_prereq install

./configure --libdir=/usr/lib64 --with-jansson-bundled

contrib/scripts/get_mp3_source.sh

make menuselect

Step 2: You will be prompted at the point to choose which modules to build. You will have already enabled most of them, but if you want MP3 support (eg for music on hold), you need to manually enable 'format_mp3' on the first page .Select "Save and exit".

Step 3 : Make the asterisk package

make

make install

make config

make samples

ldconfig

chkconfig asterisk off

Step 4 – Set Asterisk Ownership Permissions

chown asterisk. /var/run/asterisk

chown -R asterisk. /etc/asterisk

chown -R asterisk. /var/{lib,log,spool}/asterisk

chown -R asterisk. /usr/lib64/asterisk

chown -R asterisk. /var/www

Update Apache configuration

Step 1 : Update the following parameters.

sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini

sed -i 's/\(^memory_limit = \).*/\1256M/' /etc/php.ini

sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/httpd.conf

sed -i 's/AllowOverride None/AllowOverride All/' /etc/httpd/conf/httpd.conf

sed -i 's/\(^user = \).*/\1asterisk/' /etc/php-fpm.d/www.conf

sed -i 's/\(^group = \).*/\1asterisk/' /etc/php-fpm.d/www.conf

sed -i 's/\(^listen.acl_users = apache,nginx\).*/\1,asterisk/' /etc/php-fpm.d/www.conf

Step 2: Restart Apache and PHP-FPM

systemctl restart httpd.service

systemctl restart php-fpm

Download and install FreePBX.

Step 1: Download and install the FreePBX source files.

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

./install -n

Step 2 : Create a FreePBX startup script

vi /etc/systemd/system/freepbx.service

Add the following to the file.

[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

Step 3 : Run the script

systemctl enable freepbx.service

Step 4 : Start the PBX service

systemctl start freepbx

Step 5 - Check the status of the PBX service

systemctl status -l freepbx.service

Complete setup with GreePBX GUI (Graphical User Interface)

Step 1: In your browser, go to the IP address of your server (http: \\ 192.xx1)

Step 2: Create an administrator username and password.

Step 3: Enter an email address that you would like to send your notifications to.

Step 4: Name your FreePBX server.

Step 5 – Make sure you leave Module Updates, Security Updates, and Security Emails enabled and click System Settings.

No comments

Powered by Blogger.