Wednesday, November 13, 2013

Installing asterisk 11.4.0 to Centos 6.4 (64 bit)

1. Initial Set Up

You MUST run all of these commands as the root user!

2. Update the System

yum -y update
yum groupinstall core
yum groupinstall base

3. Install Required Dependencies

yum install gcc gcc-c++ bison mysql-devel mysql-server php php-mysql 
php-pear php-mbstring tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf 
caching-nameserver sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion 
kernel-devel git subversion kernel-devel php-process sqlite-devel

4. Disabling SELINUX

sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config

5. Install PearDB

You must have php with php-pear. You can refer on this link
pear install db
NOTE: You may receive a warning:
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2" At this time it is safe to ignore that message

5. Reboot Server

reboot

6. Download the Source Tarballs

wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
git clone https://github.com/spditner/asterisk-11.4.0

7. Extract the Files

tar zxvf dahdi-linux-complete*
tar zxvf libpri*
unzip asterisk*

8. Install DAHDI and libpri

NOTE: For the next set of commands it is important to follow the proper order: DAHDI first, then libpri, then Asterisk.
Install DAHDI
cd /usr/src/dahdi-linux-complete*
make && make install && make config
Install libpri.
cd /usr/src/libpri*
make && make install

9. Install the Asterisk

Change to the Asterisk directory.
cd /usr/src/asterisk*
Use this command if you are installing Asterisk on 64bit CentOS.
./configure --libdir=/usr/lib64 && make menuselect && make && make install
OPTIONAL: If you ran into errors you will want to clean the install directory before recompiling.
make clean && make distclean
Once you have an error-free install, copy the sample files from the configs subdirectory into /etc/asterisk.
make samples
Then add the Asterisk start script to the /etc/init.d/ directory
make config

10. Start and Connect to the Asterisk

Start DAHDI.
service dahdi start
Start Asterisk.
service asterisk start
Connect to the Asterisk CLI.
asterisk -rvvv
sources: http://blogs.digium.com/2012/11/05/how-to-install-asterisk-11-on-centos-6/ http://wiki.freepbx.org/display/HTGS/Installing+FreePBX+on+Centos+6.3