• 21
    Jan

Install FreePbx on Centos 7

In this post, I will show you how to install FreePbx on Centos 7. All the step will be done one by one (manually). I am running Centos 7 with 64bit

You need :

– SSH Connection for better way to work
– Root access
– Basic Linux knowledge

Login as root.

Disable SELINUX

 sed -i ‘s/(^SELINUX=).*/SELINUX=disabled/’ cat /etc/sysconfig/selinux

After reboot the sever and check the status by command

seslinux

After update the server with

yum -y update
yum groupinstall core
yum groupinstall base

Please note that MySql has been replace by MariaDB on Centos 7. As, it is a fork, basically nothing change, only the name 🙂

After, install all the dependencies required:

yum install gcc gcc-c++ lynx bison mariadb-devel mariadb-server php php-mysql php-pear php-mbstring tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion kernel-devel git subversion kernel-devel php-process crontabs cronie cronie-anacron wget vim php-xml uuid-devel libtool sqlite-devel

It gonna take some time depending on your server and internet connection speed.

Auto start MariaDB

 chkconfig –level 345 mariadb on

Start MariaDB

systemctl start mariadb

Auto start Httpd

 chkconfig –level 345 httpd on

Start Httpd

systemctl start httpd

Update Pear and Install Pear DB

pear channel-update pear.php.net
pear install db-1.7.14

After, you need to reboot your server one more time.:

reboot

Once reboot, if you want google voice working, you need to install the dependencies by following steps

Go to source folder :

cd /usr/src

Download the ikesemel file and uncompressed it

wget https://iksemel.googlecode.com/files/iksemel-1.4.tar.gz
tar xf iksemel-*.tar.gz

Once in the folder, make the installation

cd iksemel-*
./configure
make
make install

Add the Asterisk User

adduser asterisk -M -c “Asterisk User”

Go to src folder again and download Asterisk source files there.
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
git clone https://github.com/akheron/jansson.git
wget http://www.pjsip.org/release/2.2.1/pjproject-2.2.1.tar.bz2

 

(OPTIONAL) Follow this step only if you will use or are using DAHDI and LibPRI hardware. As me, I am running on virtual server and do not think I will install any DAHDI hardware, I ignore this step.

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
tar xvfz dahdi-linux-complete-current.tar.gz
tar xvfz libpri-1.4-current.tar.gz
rm -f dahdi-linux-complete-current.tar.gz libpri-1.4-current.tar.gz
cd dahdi-linux-complete-*
make all
make install
make config
cd /usr/src/libpri-1.4.*
make
make install

Compile and install pjproject
If you are doing this on a 64 bit system, please note that you MUST set the following during configure:
–libdir=/usr/lib64

cd /usr/src
tar -xjvf pjproject-2.2.1.tar.bz2
cd pjproject-2.2.1
CFLAGS=’-DPJ_HAS_IPV6=1′ ./configure –prefix=/usr –enable-shared –disable-sound
–disable-resample –disable-video –disable-opencore-amr –libdir=/usr/lib64 –> 64bit machine only
make dep
make
make install

Compile and Install jansson
If you are doing this on a 64 bit system, please note that you MUST set the following during configure:
–libdir=/usr/lib64

cd /usr/src/jansson
autoreconf -i
./configure –libdir=/usr/lib64 –> 64bit machine only
make
make install

Compile and install Asterisk
If you are doing this on a 64 bit system, please note that you MUST set the following during configure:
–libdir=/usr/lib64

cd /usr/src
tar xvfz asterisk-13-current.tar.gz
rm -f asterisk-13-current.tar.gz
cd asterisk-*
contrib/scripts/install_prereq install
./configure –libdir=/usr/lib64 –> 64bit machine only
contrib/scripts/get_mp3_source.sh
make menuselect

You will be prompted at the point to pick which modules to build. Most of them will be enabled, but if you want to have MP3 support, you need to manually turn on features like :
codec translators
extra sound
sound in different language
voicemail extra options
format_mp3

Leaving default is ok too. Hit Enter to select your options
After, select ‘Save & Exit‘ to continue the installation.

Install and Configure FreePBX

Download and extract FreePBX.

cd /usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-12.0-latest.tgz
tar vxfz freepbx-12-latest.tgz
Set ownership permissions.
chown asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /usr/lib/asterisk
chown -R asterisk. /usr/lib64/asterisk
chown -R asterisk. /var/www/

A few small modifications to Apache.

sed -i ‘s/(^upload_max_filesize = ).*/120M/’ /etc/php.ini
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_orig
sed -i ‘s/^(User|Group).*/1 asterisk/’ /etc/httpd/conf/httpd.conf
service httpd restart

The post Install FreePbx on Centos 7 appeared first on IT Secure Net.

Powered by WPeMatico

Comments are closed.

THEME OPTIONS

Choose a combination of predefined colors here. Here are some examples. You can create any additional number on your backend theme, also can choose the background you want and four differents layouts.

SKINS COLOR LAYOUT STYLE
BACKGROUND PATTERNS