Bluebox FreeSwitch install guide (CentOS v6.x, Freeswitch v1.2, Bluebox v1)

Sections: 

Freeswitch

This guide includes every detail in the form of step by step instructions from basic OS to a running Freeswitch + Bluebox VoIP PBX in about 1 hour.  In this guide we install Freeswitch and Bluebox manually from source. 

Tested on:

CentOS v6.5
Freeswitch v 1.2
Bluebox v1.0.4

Lets get started

Install the EPEL repository.  This is optional but often useful for adding 3rd party tools.

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Update the base install

yum -y update

Install Freeswitch/Bluebox required packages, other useful packages, and their dependencies

yum -y groupinstall core
yum -y groupinstall base
yum -y install git autoconf make automake nano libtool gcc-c++ ncurses-devel make expat-devel zlib zlib-devel libjpeg-devel unixODBC-devel openssl-devel gnutls-devel libogg-devel libvorbis-devel ncurses-devel python-devel zlib zlib-devel bzip2 which pkgconfig curl-devel libtiff-devel mysql-server php php-mysql php-xml

Verify that SELINUX is disabled

sestatus

If not then edit /etc/sysconfig/selinuxto disable on boot and then reboot.

SELINUX=disabled

Install Freeswitch

cd /usr/src/
git clone -b v1.2.stable https://stash.freeswitch.org/scm/fs/freeswitch.git
cd freeswitch
./bootstrap.sh && ./configure && make && make install && make all cd-sounds-install cd-moh-install

Install Freeswitch start/stop script

Create and install Freeswitch start/stop script.

cd /etc/init.d
touch freeswitch
chmod a+x freeswitch
nano freeswitch

Copy/paste the script contained in this text file into the freeswitch file we just created above.

Add the script as a service and set it to start on boot up.

chkconfig --add freeswitch
chkconfig freeswitch on

Add user freeswitch

adduser freeswitch -M -d /usr/local/freeswitch -s /sbin/nologin -c "Freeswitch user"
chown -R freeswitch. /usr/local/freeswitch
chown -R freeswitch. /var/lib/php/session

Change apache ownerships

sed -i "s/User apache/User freeswitch/" /etc/httpd/conf/httpd.conf
sed -i "s/Group apache/Group freeswitch/" /etc/httpd/conf/httpd.conf

Enable all services

chkconfig httpd on
chkconfig mysqld on
service freeswitch start 
service httpd start 
service mysqld start

Create mysql user account

If mysql root password has been set use mysql -p and enter the password when prompted

#mysql
mysql> CREATE USER 'bluebox'@'localhost' IDENTIFIED BY 'bluebox';
mysql> GRANT ALL PRIVILEGES ON bluebox.* TO 'bluebox'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> \q

Secure mysql

Add mysql root password if not already set.
 
mysqladmin -u root password 'somerootpassword'
 
Add the following line to /etc/my.cnf under [mysqld] to prevent external network connections.
 
bind-address = 127.0.0.1

Restart mysql for the change to take effect

service mysqld restart

Bluebox install

Install bluebox source and preconfigure.

cd /var/www/html
git clone git://github.com/2600hz/bluebox.git bluebox
chown -R freeswitch. /var/www/html/bluebox
cd /var/www/html/bluebox
./preinstall.sh
​service httpd restart

Browse to http://freeswitch_server_IP/bluebox to complete the install.

When the install asks for the web user name change default (apache) to "freeswitch" (without quotes).  Everything else can remain at default (Just repeatedly press ENTER when it asks)

Only thing needed to do on browser running the bluebox web install wizard is set timezone and add administrator account.  All other settings can stay at default.