Bluebox FreeSwitch install guide (CentOS v5.x, Freeswitch v1.0.x, Bluebox)

Sections: 

Bluebox was formerly known as FreePBX v3.  It has now been spun off into it's own project.  This version of FreePBX supports Freeswitch in addition to Asterisk.

Bluebox is still a work in progress. We felt it was far enough along to create an install guide for those who want to dip their toes in and try out FreeSwitch at the same time.  The Bluebox portion of this guide can be used in conjunction with the Asterisk install portion of one of our other guides although we have not tested the combination.

This guide includes every detail in the form of step by step instructions from bare metal to a running VoIP PBX in about 1 hour.  In this guide we prefer to install Freeswitch and Bluebox manually from source.  It helps avoid problems often encountered with other installation methods such as version dependencies.  With little effort this guide could be modified to install on Debian or some other flavor of Linux.  It could also be used to create an install script.

This guide has been tested using:

CentOS v5.7
Freeswitch v 1.0.7
Bluebox v1.03

Linux commands executed at a command prompt are in courier font

We are not including instruction for installing telecom hardware drivers.  Refer to the manufacturer and Freeswitch websites for those details.

Lets get started

This guide assumes you already have a minimal CentOS v5 install.  Just enough to get a command line is adequate.  For details on that see the first section of this guide.

Install the EPEL repository
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/`uname -i`/epel-release-5-4.noarch.rpm
or
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

From a root command prompt 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 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 curl-devel libtiff-devel mysql-server

PHP 5.2 is available via the CentOS 5 testing repository
cd /etc/yum.repos.d/
wget http://dev.centos.org/centos/5/CentOS-Testing.repo
yum -y --enablerepo=c5-testing install php php-mysql php-posix php-gd php-xml

Probably a good idea to reboot at this point to ensure we are starting the way the system would normally with all the above packages and updates.
reboot

Install Freeswitch.
cd /usr/src/

git clone git://git.freeswitch.org/freeswitch.git
cd freeswitch
./bootstrap.sh && ./configure && make && make install && make all cd-sounds-install cd-moh-install

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.

Save the file (CTL-x, y, ENTER)

Add the script as a service and set it to start on boot up.
chkconfig --add freeswitch
chkconfig freeswitch on

Add user/group freeswitch and change directory/apache ownerships
useradd freeswitch
groupadd freeswitch

chown -R freeswitch:freeswitch /usr/local/freeswitch
chown -R freeswitch:freeswitch /var/lib/php/session

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 Apache and mysql to start on boot and start the services for this session
chkconfig httpd on
chkconfig mysqld on

service freeswitch start
service httpd start
service mysqld start

Bluebox install

Create mysql user account.

 

mysql

 

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

cd /var/www/html
git clone git://source.2600hz.org/bluebox.git
chown -R freeswitch:freeswitch /var/www/html/bluebox
cd /var/www/html/bluebox
./preinstall.sh

NOTE: When the install asks you 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)

When the install finishes modify the default PHP memory size
sed -i 's/memory_limit = 32M/memory_limit = 128M/g' /etc/php.ini

restart httpd.
service httpd restart

Browse to http://xxx.xxx.xxx.xxx/bluebox (where xxx.xxx.xxx.xxx is the IP address of your bluebox server) to complete the install.

Only thing you should need to do on your browser running the bluebox web install wizard is set your timezone and add your administrator email address.  All other settings can stay at default.