Difference between revisions of "CentOS Install"

From FusionPBX
Jump to: navigation, search
(Created page with "==Zaptel Install== If this system is to use cards inside the phone server than Zaptel needs to be installed. ==Sangoma Wanpipe== This is a Sangoma specific driver it can be us...")
 
m (FreeSWITCH Install)
Line 176: Line 176:
 
Install the following dependencies
 
Install the following dependencies
  
yum install subversion autoconf automake libtool gcc-c++ ncurses-devel make expat-devel zlib zlib-devel
+
yum install subversion autoconf automake libtool gcc-c++ ncurses-devel make expat-devel zlib zlib-devel
  
 
The following will enable additional modules
 
The following will enable additional modules
  
yum install nano unixODBC-devel openssl-devel gnutls-devel libogg-devel libvorbis-devel curl-devel
+
yum install nano unixODBC-devel openssl-devel gnutls-devel libogg-devel libvorbis-devel curl-devel
  
 
Then use the following
 
Then use the following
  
cd /usr/src/
+
cd /usr/src/
git clone git://git.freeswitch.org/freeswitch.git
+
git clone git://git.freeswitch.org/freeswitch.git
cd /usr/src/freeswitch
+
cd /usr/src/freeswitch
./bootstrap.sh
+
./bootstrap.sh
./configure
+
./configure
make install
+
make install
make cd-sounds-install
+
make cd-sounds-install
make cd-moh-install
+
make cd-moh-install
  
+---------- FreeSWITCH install Complete ----------+
+
+---------- FreeSWITCH install Complete ----------+
+ FreeSWITCH has been successfully installed.    +
+
+ FreeSWITCH has been successfully installed.    +
+                                                +
+
+                                                +
+      Install sounds:                          +
+
+      Install sounds:                          +
+      (uhd-sounds includes hd-sounds, sounds)  +
+
+      (uhd-sounds includes hd-sounds, sounds)  +
+      (hd-sounds includes sounds)              +
+
+      (hd-sounds includes sounds)              +
+      ------------------------------------      +
+
+      ------------------------------------      +
+                make cd-sounds-install          +
+
+                make cd-sounds-install          +
+                make cd-moh-install              +
+
+                make cd-moh-install              +
+                                                +
+
+                                                +
+                make uhd-sounds-install          +
+
+                make uhd-sounds-install          +
+                make uhd-moh-install            +
+
+                make uhd-moh-install            +
+                                                +
+
+                                                +
+                make hd-sounds-install          +
+
+                make hd-sounds-install          +
+                make hd-moh-install              +
+
+                make hd-moh-install              +
+                                                +
+
+                                                +
+                make sounds-install              +
+
+                make sounds-install              +
+                make moh-install                +
+
+                make moh-install                +
+                                                +
+
+                                                +
+      Install non english sounds:              +
+
+      Install non english sounds:              +
+      replace XX with language                  +
+
+      replace XX with language                  +
+      (ru : Russian)                            +
+
+      (ru : Russian)                            +
+      ------------------------------------      +
+
+      ------------------------------------      +
+                make cd-sounds-XX-install        +
+
+                make cd-sounds-XX-install        +
+                make uhd-sounds-XX-install      +
+
+                make uhd-sounds-XX-install      +
+                make hd-sounds-XX-install        +
+
+                make hd-sounds-XX-install        +
+                make sounds-XX-install          +
+
+                make sounds-XX-install          +
+                                                +
+
+                                                +
+      Upgrade to latest:                        +
+
+      Upgrade to latest:                        +
+      ----------------------------------        +
+
+      ----------------------------------        +
+                make current                    +
+
+                make current                    +
+                                                +
+
+                                                +
+      Rebuild all:                              +
+
+      Rebuild all:                              +
+      ----------------------------------        +
+
+      ----------------------------------        +
+                make sure                        +
+
+                make sure                        +
+                                                +
+
+                                                +
+      Install/Re-install default config:        +
+
+      Install/Re-install default config:        +
+      ----------------------------------        +
+
+      ----------------------------------        +
+                make samples                    +
+
+                make samples                    +
+                                                +
+
+                                                +
+                                                +
+
+                                                +
+      Additional resources:                    +
+
+      Additional resources:                    +
+      ----------------------------------        +
+
+      ----------------------------------        +
+      http://www.freeswitch.org                 +
+
+      http://www.freeswitch.org               +
+      http://wiki.freeswitch.org               +
+
+      http://wiki.freeswitch.org             +
+      http://jira.freeswitch.org               +
+
+      http://jira.freeswitch.org             +
+      http://lists.freeswitch.org               +
+
+      http://lists.freeswitch.org             +
+                                                +
+
+                                                +
+      irc.freenode.net / #freeswitch            +
+
+      irc.freenode.net / #freeswitch            +
+                                                +
+
+                                                +
+-------------------------------------------------+
+
+-------------------------------------------------+
  
 
To enable a few extra features you may want to go ahead and edit modules.conf. Remove the # in front of the lines with these modules:
 
To enable a few extra features you may want to go ahead and edit modules.conf. Remove the # in front of the lines with these modules:
  
mod_spandsp
+
mod_spandsp
mod_shout
+
mod_shout
mod_flite
+
mod_flite
mod_pocketshpinx
+
mod_pocketshpinx
  
 
After saving the changes you may want to go ahead and get your "git together":
 
After saving the changes you may want to go ahead and get your "git together":
  
cd freeswitch
+
cd freeswitch
git pull
+
git pull
make current
+
make current
  
 
After this you have the latest FreeSWITCH ready for use with FusionPBX
 
After this you have the latest FreeSWITCH ready for use with FusionPBX

Revision as of 01:08, 12 September 2010

Zaptel Install

If this system is to use cards inside the phone server than Zaptel needs to be installed.

Sangoma Wanpipe

This is a Sangoma specific driver it can be used or Zaptel can be used. http://wiki.sangoma.com/wanpipe-freeswitch-install

Install dependency packages

sudo yum install -y kernel-devel.x86_64 zaptel-devel.x86_64 sudo yum install lksctp-tools-devel sudo yum install flex libtermcap-devel bison

Get zaptel source

cd /usr/src svn checkout http://svn.digium.com/svn/zaptel/branches/1.4 zaptel

or

cd /usr/src/ wget http://downloads.asterisk.org/pub/telephony/zaptel/zaptel-1.4.12.1.tar.gz

Get wanpipe source

cd /usr/src/ wget ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-3.5.10.tgz tar xvfz wanpipe-3.5.10.tgz cd /usr/src/wanpipe-3.5.10


Install wanpipe

./Setup install


Would you like to install WANPIPE now? [y] (y/n) y Press [Enter] to continue... Please specify absolute path name of your linux headers/source directory

Press Enter for Default: /lib/modules/2.6.18-164.el5/build /usr/src/kernels/2.6.18-164.11.1.el5-x86_64/

Install modules for current image: 2.6.18-164.el5 ? (y/n) y

Press [Enter] to continue...

Please Select Compilation Mode Please select (1-11) [Default: 1]:

10. TDM API

     Protocols: TDM API on AFT adapters:
     Default for: FreeSwitch, Yate, Sunrise
                  Custom voice development

Please select (1-11) [Default: 1]: 10

Please select a protocol option in [<opt>]: ALL (for all)

Please select working zaptel directory [1-1][m]: m

Please enter zaptel dir: [Default: /usr/src/zaptel]

  1. > /usr/src/zaptel 

Checking for UDEV Zaptel compatibility...

 Would you like to add UDEV rules for Zaptel devices ? (y/n) n

Press [Enter] to continue... Press [Enter] to continue...

[EXIT|Q|q]: Exit Protocol Selection

Please select a protocol option in [<opt>]: EXIT

Visually Confirm that driver compilation was successful! (y/n) y


  WANPIPE v3.5.10 Installation Script
  Copyright (c) 1995-2009, Sangoma Technologies Inc.

WANPIPE META CONFIGURATION

There are two configuration files associated with WANPIPE.

1) /usr/src/wanpipe-3.5.10/wanrouter.rc:

      - defines locations of important files such as lock
        and configuration files as well as start/stop
        order of multiple WANPIPE devices.

2) /usr/src/wanpipe-3.5.10/wanpipe1.conf:

      - main configuration file for each WANPIPE device.
      - defines interfaces, hardware and protocol information.
      - this file can be created using the 'wancfg' GUI
        utility or manually based on sample files located
        in /etc/wanpipe/samples.

Please read the WanpipeInstallation.(pdf/txt) manual for further information.

Press [Enter] to continue...

Please specify a desired location for WANPIPE configuration files.

      (Press Enter for Default: /etc/wanpipe)

<specify path:> /etc/wanpipe

Please specify a desired location for WANPIPE interface files.

      (Press Enter for Default: /etc/wanpipe/interfaces)

<specify path:> /etc/wanpipe/interfaces

Please specify a location for WANPIPE binary, firmware files.

      (Press Enter for Default: /etc/wanpipe/firmware)

<specify path:> /etc/wanpipe/firmware


  WANPIPE v3.5.10 Installation Script
  Copyright (c) 1995-2009, Sangoma Technologies Inc.

WANPIPE UTILITIES SETUP

WANPIPE utilities are used to:

      1) create configuration files: for Zaptel and Asterisk
              /usr/sbin/wancfg_zaptel #Zaptel and Asterisk
              /usr/sbin/wancfg_dahdi  #Dahdi and Asterisk
              /usr/sbin/wancfg_smg    #BRI/SS7, Zaptel and Asterisk
              /usr/sbin/wancfg_tdmapi #TDM API
      2) create WANPIPE WAN/IP configuration files.
              (/usr/sbin/wancfg)
      3) start,stop,restart individual/all devices and interfaces.
              (/usr/sbin/wanrouter)
      4) debug line, protocol and driver problems.
              (/usr/sbin/wanpipemon)
      5) aid in WANPIPE API development
              (/etc/wanpipe/api)

Refer to the WanpipeInstallation.(pdf/txt) for more information.

Press [Enter] to continue...

Press [Enter] to continue...


Installing WANPIPE Files ... ! Installing WANPIPE Utilities in /usr/sbin Installing wanrouter.rc in /etc/wanpipe Installing wanpipe libraries in /etc/wanpipe Installing firmware in /etc/wanpipe/firmware Installing documentation in /usr/share/doc/wanpipe Installing sample api code in /etc/wanpipe/api Installing AFT Firmware update utility in /etc/wanpipe/util Installing driver headers in /etc/wanpipe/api/include/linux Installing Hardware Echo Cancel Utilites Press [Enter] to continue...


Would you like to install WANPIPE start-up scripts? (y/n) y


  WANPIPE v3.5.10 Installation Script
  Copyright (c) 1995-2009, Sangoma Technologies Inc.

WANPIPE INSTALLATON: COMPLETE

WANPIPE installation is now complete. WANPIPE kernel drivers and configuration/debug utilities have been compiled and installed.

      1) Proceed to configure the WANPIPE drivers:
              Asterisk/Zaptel  : /usr/sbin/wancfg_zaptel
              Asterisk/Dahdi   : /usr/sbin/wancfg_dahdi
              TDM API          : /usr/sbin/wancfg_tdmapi
              SMG SS7/BRI/PRI  : /usr/sbin/wancfg_smg
              WAN Routing/API  : /usr/sbin/wancfg
      2) Use the /usr/sbin/wanrouter startup script to start and stop
         the router. (eg: wanrouter start)
      3) To uninstall WANPIPE package run ./Setup remove

Please read http://wiki.sangoma.com for further instructions.

FreeSWITCH Install

Install the following dependencies

yum install subversion autoconf automake libtool gcc-c++ ncurses-devel make expat-devel zlib zlib-devel

The following will enable additional modules

yum install nano unixODBC-devel openssl-devel gnutls-devel libogg-devel libvorbis-devel curl-devel

Then use the following

cd /usr/src/
git clone git://git.freeswitch.org/freeswitch.git
cd /usr/src/freeswitch
./bootstrap.sh
./configure
make install
make cd-sounds-install
make cd-moh-install
+---------- FreeSWITCH install Complete ----------+
+ FreeSWITCH has been successfully installed.     +
+                                                 +
+       Install sounds:                           +
+       (uhd-sounds includes hd-sounds, sounds)   +
+       (hd-sounds includes sounds)               +
+       ------------------------------------      +
+                make cd-sounds-install           +
+                make cd-moh-install              +
+                                                 +
+                make uhd-sounds-install          +
+                make uhd-moh-install             +
+                                                 +
+                make hd-sounds-install           +
+                make hd-moh-install              +
+                                                 +
+                make sounds-install              +
+                make moh-install                 +
+                                                 +
+       Install non english sounds:               +
+       replace XX with language                  +
+       (ru : Russian)                            +
+       ------------------------------------      +
+                make cd-sounds-XX-install        +
+                make uhd-sounds-XX-install       +
+                make hd-sounds-XX-install        +
+                make sounds-XX-install           +
+                                                 +
+       Upgrade to latest:                        +
+       ----------------------------------        +
+                make current                     +
+                                                 +
+       Rebuild all:                              +
+       ----------------------------------        +
+                make sure                        +
+                                                 +
+       Install/Re-install default config:        +
+       ----------------------------------        +
+                make samples                     +
+                                                 +
+                                                 +
+       Additional resources:                     +
+       ----------------------------------        +
+       http://www.freeswitch.org               +
+       http://wiki.freeswitch.org              +
+       http://jira.freeswitch.org              +
+       http://lists.freeswitch.org             +
+                                                 +
+       irc.freenode.net / #freeswitch            +
+                                                 +
+-------------------------------------------------+

To enable a few extra features you may want to go ahead and edit modules.conf. Remove the # in front of the lines with these modules:

mod_spandsp
mod_shout
mod_flite
mod_pocketshpinx

After saving the changes you may want to go ahead and get your "git together":

cd freeswitch
git pull
make current

After this you have the latest FreeSWITCH ready for use with FusionPBX

FreeSWITCH Auto Start

To get CentOS to start FreeSWITCH at boot time copy the text from the link and save it to a file /etc/init.d/freeswitch.

   * CentOS /etc/init.d/freeswitch 

Set the permissions and add it to run on startup

chmod 755 /etc/init.d/freeswitch
chkconfig --add freeswitch
chkconfig --level 5 freeswitch on
chkconfig --list freeswitch
ln -s /etc/init.d/freeswitch /usr/sbin/rcfreeswitch

CentoOS 32-bit Install

   * Take a look at, installing FusionPBX on CentOS in 4 Steps. 

CentoOS 64-bit Install

If you don't have 64-bit support, just remove x86_64 from the below packages.

Additional Tools

On CentOS w/ 64-bit support: CentOS does not yet ship a recent enough version of PHP, so we suggest you use the RPMs provided in the REMI repository. To do so:

wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm rpm -Uvh epel-release-5-3.noarch.rpm rpm -Uvh remi-release-5.rpm


yum install zaptel.x86_64 zaptel-lib.x86_64 zaptel-utils.x86_64 libpri.x86_64 spandsp.x86_64

PostgreSQL

rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm yum --enablerepo=remi install php php-common php-pgsql php-pdo php-soap php-xml php-xmlrpc yum --enablerepo=remi upgrade php php-common php-pdo


MySQL

Before installing the remi packages, it is suggested that you install the dependent libraries. The upstream packages does not have the correct version and conflict with each other. To do so:

wget http://downloads.mysql.com/archives/mysql-5.1/MySQL-shared-compat-5.1.30-0.rhel5.x86_64.rpm rpm -Uvh MySQL-shared-compat-5.1.30-0.rhel5.x86_64.rpm

If you get a conflict, force it.

rpm -Uvh MySQL-shared-compat-5.1.30-0.rhel5.x86_64.rpm --force

Now that you have all the version of mysql client libraries; things just install cleanly.

rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm yum --enablerepo=remi install php php-common php-mysql php-pdo php-soap php-xml php-xmlrpc yum --enablerepo=remi upgrade php php-common php-pdo

Permissions

Set permissions

adduser freeswitch chown -R freeswitch:freeswitch /usr/local/freeswitch chown -R apache:apache /var/www/fusionpbx chmod 766 -R /var/www/fusionpbx

Add the apache user to the freeswitch group

nano /etc/group

Before:

freeswitch:x:500

After:

freeswitch:x:500:freeswitch,apache

Fusionpbx

Dependencies Subversion

yum install subversion

Apache

yum install apache2

PHP >= 5.2.3

yum install php5 php5-pdo php-sqlite php5-pdo_sqlite

Install the backend of your choice

sqlite

yum install sqlite3 php5-pdo_sqlite

mysql

yum install mysql-server.x86_64 mysql.x86_64 mysql-server-devel.x86_64 php5-pdo_mysql

postgresql

yum install php5-pdo_pgsql postgresql-server.x86_64 postgresql.x86_64

FusionPBX install

Download FusionPBX source and add it to Apache

cd /var/www sudo svn checkout http://fusionpbx.googlecode.com/svn/trunk/fusionpbx /var/www/fusionpbx

Network Time Protocol

If NTP is not installed then install it.

yum install ntp
chkconfig ntpd on
ntpdate pool.ntp.org
service ntpd start

If NTP is running then do the following:

service ntpd stop
ntpdate pool.ntp.org
service ntpd start

Additional Notes

How to start stop FreeSWITCH

/usr/local/freeswitch/bin/freeswitch -stop
/usr/local/freeswitch/bin/freeswitch -nc 

How to start, stop and restart Apache

service httpd start
service httpd stop
service httpd restart

Change the CentOS root password

su root
passwd