How to install FreePBX on Asterisk

How to install FreePBX   on Asterisk

 

 

Go to the t Directory

cd /usr/src
wget http://mirror.freepbx.org/freepbx-2.9.0.tar.gz
tar -zxvf freepbx-2.9.0.tar.gz
cd freepbx-2.9.0

 

Create database and import to SQL directory

mysqladmin create asterisk -u root -p
mysqladmin create asteriskcdrdb -u root -p
mysql -u root -p asterisk < SQL/newinstall.sql
mysql -u root -p asteriskcdrdb < SQL/cdr_mysql_table.sql

Open a mysql prompt with:

mysql -u root -p

Create mysql user and set all privileges
On the prompt run the following queries

GRANT ALL PRIVILEGES ON asterisk.* TO asterisk@localhost IDENTIFIED BY ‘yourpassword’;
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO   asterisk@localhost IDENTIFIED BY ‘yourpassword’;
flush privileges;
quit;

Before running the install command, make a copy of /etc/asterisk/modules.conf.

cp /etc/asterisk/modules.conf ~/asterisk-modules.conf

We are ready to install freepbx

./install_amp

After the complete installation restore asterisk-modules.conf file, which you backed up before installing FreePBX:

cp ~/asterisk-modules.conf /etc/asterisk/modules.conf

Apache runs as www-data, Asterisk as user asterisk, so we have to change some permission to make both programs work together. First, add www-data to asterisk group

adduser www-data asterisk

open the amportal.conf file set the apache permision

vi /etc/amportal.conf

Chang the following lines
AMPASTERISKUSER=www-data
AMPASTERISKGROUP=asterisk
AMPASTERISKWEBUSER=www-data
AMPASTERISKWEBGROUP=asterisk

Its time to start amportal

amportal start

Open your web browser and go to http://servername-ipaddress/admin

2 thoughts on “How to install FreePBX on Asterisk

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.