I 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
Monday, January 18, 2010
Subscribe to:
Post Comments (Atom)
Good job!!
ReplyDeleteI had some problems, but at the end all is working. Im trying of configure gtalk but it only works when is in the same lan. you have some tutorial for trixbox-gtalk? jeje
the problems that i encounter are:
#yum -y install httpd memcached php php-pear php-mysql
No package memcached available
this was resolved with:
# rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
Retrieving http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# yum -y install memcached
# cd /etc/yum.repos.d
# ls
CentOS-Base.repo CentOS-Media.repo mirrors-rpmforge rpmforge.repo trixbox.repo
# rm mirrors-rpmforge
rm: remove regular file `mirrors-rpmforge'? y
rm rpmforge.repo
rm: remove regular file `rpmforge.repo'? y
# yum clean all
continue with the rest of commands.
Regards
Victor
Hi
ReplyDeleteare you trying installing trixbox 2.8 in a VPS?
i try following the same procedure but changing the
[trixbox]
name=trixbox RPM Repository for CentOS and RHEL
baseurl=http://yum.trixbox.org/centos/$releasever/RPMS/
gpgcheck=0
enabled=1
to
[trixbox]
name=trixbox RPM Repository for CentOS and RHEL
baseurl=http://yum.trixbox.org/trixbox/2.8/RPMS/
gpgcheck=0
enabled=1
But i get a lot of errors
@poster, thanks for sharing.
ReplyDelete@Victor.. I was able to install gTalk with the help of a link below:
http://www.eukhost.com/forums/f15/install-linux-gui-kde-hud-gtalk-all-one-asterisk-based-trixbox-11957/
I followed exactly the procedure in installing trixbox.. installing memcached failed and have to follow instructions from other site to get a successful install.
ReplyDeleteI had problem though when installing the amportal.. got this error.
PHP Warning: Invalid argument supplied for foreach() in /usr/src/tbm-pbxconfig- 5.0.0/install_amp on line 159
PHP Notice: Undefined variable: conf in /usr/src/tbm-pbxconfig-5.0.0/install_am p on line 175
[FATAL] FAILED. Have you installed Asterisk?
Now i can't open my PABX Settings or http://myip/admin
How do i proceed with this?
Thanks.
I had this error when installing the amportal:
ReplyDeletePHP Warning: Invalid argument supplied for foreach() in /usr/src/tbm-pbxconfig- 5.0.0/install_amp on line 159
PHP Notice: Undefined variable: conf in /usr/src/tbm-pbxconfig-5.0.0/install_am p on line 175
[FATAL] FAILED. Have you installed Asterisk?
I can't open my PABX Setting or http://myip/admin
How do I proceed?
Hello Carlos I followed all steps but failed copying /etc/asterisk-1.4.21.2_samples No such file or directory. I tried to locate in the entire server.
ReplyDelete[root@triboxcentos64bit /]# cp /etc/asterisk-1.4.21.2_samples/ /etc/asterisk
cp: cannot stat `/etc/asterisk-1.4.21.2_samples/': No such file or directory
Thanks,
Javier
Hello I reinstalled the procedure in a fresh CentOS 5.6 when running the command to install Asterisk I get the following:
ReplyDelete--> Finished Dependency Resolution
asterisk-1.4.22-4.i386 from trixbox has depsolving problems
--> Missing Dependency: libtds.so.5 is needed by package asterisk-1.4.22-4.i386 (trixbox)
Error: Missing Dependency: libtds.so.5 is needed by package asterisk-1.4.22-4.i386 (trixbox)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
What Can I do?