Saturday, February 19, 2011

Installing Trixbox Remote Server

have been using Trixbox for a while and I think it is time to have documented how to install it without CD using a VPS.

First, Trixbox is a set of tools that help you to maintain Asterisk.
Asterisk is opensource PBX software. It allows you to have VOIP extensions using your network connections. For my case, I have deployed 5 extensions in 5 different location in 3 countries with no long distance charge. Moreover, I can use my VOIP extension anywhere as long as I have Internet connection.

I started to use Trixbox at home using virtual machine running on Citrix Xen, however with time you realize that your phone system needs to be reliable and keeping it at home makes that task complicated (power outage, hardware problems). So I decided to move it to a data center.
Trixbox installation at home was pretty simple task since you can get de ISO image and burn a CD. But the big question was how I can install it on server running Centos 5.3 (32 bits)*

Note: I have installed Trixbox on Centos 5.3 (64bit), however Trixbox was designed to work on 32bit so you will probably have some issues with libraries since the path on Trixbox has bee set up to /usr/lib instead of /usr/lib64.

Choosing Hosting provider. My current installation is running with Godaddy , the service has been excellent and the price is ok ($30 a month for 256Mb, 20GB server) however I found a hosting provider RackUnlimited that can provide you the same for only $8 a month. At this point, I have a server with RackUnlimited and I am going to show the process of installing Trixbox.

Installation Process

1- Login on the server and make sure you have all the basic tools that you need. RackUlimited provide me with a very slim version Centos 5.3 so I had to install some packages.

# yum -y install vim-minimal sudo postfix

Also I like to install webmin ...so I grabbed the RPM form webmin.com and I installed it.

2- Install essentials packages for Trixbox.

#yum -y install mysql mysql-server mysql-devel

MySQL database

#yum -y install httpd memcached php php-pear php-mysql
# pear install DB

Apache Server and PHP packages

Now we I have server with a LAMP enviroments

3- Add the Trixbox repo

#vi /etc/yum.repos.d/trixbox.repo

[trixbox]
name=trixbox RPM Repository for CentOS and RHEL
baseurl=http://yum.trixbox.org/centos/$releasever/RPMS/
gpgcheck=0
enabled=1

#yum clean all

4- Install asterisk

#yum install asterisk
#mkdir /etc/asterisk
#cp /etc/asterisk-1.4.21.2_samples/ /etc/asterisk

5- Start all services.

#/etc/init.d/mysql start
#/etc/init.d/httpd start
#/etc/init.d/memcached start
#/etc/ini.d/asterisk start

6- Install Trixbox scripts.

#yum install tbm-pbxconfig

7- Create Databases and users.

#mysqladmin create asterisk
#mysqladmin create asteriskcdrdb
#mysql asterisk < /usr/src/tbm-pbxconfig/SQL/newinstall.sql
#mysql asteriskcdrdb < /usr/src/tbm-pbxconfig/SQL/cdr_mysql_table.sql

#mysql

mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
Query OK, 0 rows affected (0.02 sec)

mysql> GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'amp109';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

8- Install all Trixbox packages

#yum groupinstall Trixboxcore

9- Installing the amportal

#/usr/src/tbm-pbxconfig/install_amp

Accept the default values.

After this is done restart MySQL, Apache, memcached , and amportal.

10- Authentication for web interface

#mkdir -p /usr/local/apache/passwd/
#touch /usr/local/apache/passwd/wwwpasswd
#passwd-maint

user: maint
pass: ******

Finally you can access the Web interface.

http://serverip/

Note:
Time on Xen VMs is restricted by Dom0, so if you want to change the time in your VM you will have to do the following.

#echo 1 > /proc/sys/xen/independent_wallclock

to leave it perm do the following

#vi /etc/sysctl.conf
add
xen.independent_wallclock = 1

Change the timezone

#cp /usr/share/zoneinfo/America/New_York /etc/localtime

However you can install yo modify the time zone

#yum -y install system-config-date
#system-config-date

Adding G729 Codec .....

G729 is a voice compression protocol designed by Digium.G729 is capable of using very little bandwidth with good voice quality (8K). You can buy a license for this codec from Digium or use a free version (free version is not considered very stable).

This guy made a pretty good job showing how to use G729.
http://nigglingaspirations.blogspot.com/2009/10/installing-free-g729-codec-on-trixbox.html

2 comments:

  1. Wonderful post and such a fantastic information that you gave to us. Thank you so much for it. You made a good site and also you sharing the best information on this topic. I am impressed with your site’s blog. Thank you all
    ZohoSetup

    ReplyDelete
  2. Remote jobs Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors.

    ReplyDelete

With Vision and Solution