Sunday, September 13, 2015

FusionPBX 3.8.4 on CentOS 7

This is the basic setup instructions for installing FusionPBX on a CentOS host.
Details:- 
  • CentOS 6.x (tested 6.6 minimal install)
  • PostgreSQL 9.4
  • Nginx
Requirements
  • Internet connected host 

Step 1: Install a CentOS

Configure a basic host.  Minimum 1GB RAM, 10GB disk, and 2 cores CPU.
CentOS 6.6 minimal 64 bit install.
LVM is not required in a basic install, but advantageous if enough disk.

Step 2: Install script

Copy the install script to the host. install_fusionpbx_postgres_9.4-20150504.sh.txt
 Optional: To populate Freeswitch database:  (Note: Freeswitch database is still not needed as long as Fusionpbx database is operational as this install uses Fusionpbx DB as default for saving all data including CDR)
 After installation, add  following code inside <settings> in  
/usr/local/freeswitch/conf/autoload_configs/switch.conf.xml 
<!-- to use a numeric IP address (no DNS names!): -->
<param name="core-db-dsn" value="pgsql://hostaddr=127.0.0.1 
dbname=freeswitch user=freeswitch password='' options='-c
client_min_messages=NOTICE' application_name='freeswitch'" />
And restart freeswitch
service freeswitch restart

Optional: Using an editor (vi, vim, etc.), edit the script, and update the parameters referring to the company name, hostname, etc.
Sign up to root (sudo su -), and then execute the script.  It's advisable to start a log script, so that any errors can be checked later.  
NOTE: A lot of output is generated, and approximately 1GB of updates is applied to a fresh 6.6 CentOS install.
script fusionpbx.log
chmod uog+rx install_fusionpbx_postgres_9.4-20150504.sh
./install_fusionpbx_postgres_9.4-20150504.sh
Towards the end of the script, you will be prompted several times to accept the certificates being generated.  Simply answer "Y" to each response.
Once the script completes, and returns to a prompt, you can verify that all primary processes are operational by running the following commands:-
service nginx status
service postgresql-9.4 status
service freeswitch status
You should see similar output to the following:-

Step 3: Start browser based config

As per the last statement in the config, launch a browser, and go to the IP address of the host.  (http or https should work.)
Select the database as "postgresql", and enter a username and password that will be used to do the initial configuration of the FusionPBX system.
Click the "Next" button on the right hand side of the screen.

Step 4: Specify the DB

You should be prompted for the details of the database.
Specify the following:-
  • Database Host: localhost
  • Database Port: 5432
  • Database Name: fusionpbx
  • Database Username: fusionpbx
  • Database Password: fusionpbx
  • Create Database Username: <leave blank>
  • Create Database Password: <leave blank>

Click "Install" on the right hand side of the page

Step 5: Login

You will be prompted to log into the system for the first time.
Enter the username and password you selected in step 3 above.

Step 6: Update initial settings

From the menu bar, go to the Advanced menu, and select the Default Settings option.
Scroll down to the following sections, and change/ensure the values as follows:-
  • Server
    • backup = /backup
  • Switch
    • base = /usr/local/freeswitch
    • mod = /usr/local/freeswitch/mod

Step 7: Update System settings

(For FusionPBX version 3.6.3) - To check version, go to Status>System Status
From the System menu, go to the Settings option. 
Modify the Mod Shout Decoder option to be "mpg123".
Click "Save" on the right hand side.

(For FusionPBX version >=3.8.3) 
Go to Advanced menu > Settings option. 
You cannot modify Mod Shout Decoder to "mpg123", instead it has choices "i486, i586, i686,  amd64, generic". 
Don't change anything, leave it as it is. 

Step 8 : Enable xml_cdr module to save Call Detail Records in DB.

(For FusionPBX version 3.6.3)
Go to System menu > Modules option.
Under XML Interfaces, ensure XML CDR module is running.
If not Start it by clicking on "Start" under Action.
(For FusionPBX version >= 3.8.3)
Go to Advanced menu > Modules option.
Same as above.

No comments:

Post a Comment