Knowledgebase
PC Buddy Helpdesk - Free computer help > The real PC Buddy Help Desk > Knowledgebase

Search help:


Asterisk-Installation

Solution

How to install asterisk?

This page shows installation of Asterisk 11.0.0 on CentOS 6. It's been assumed that you have already installed CentOS 6 on your machine. The main steps of installation can be summarized as:

1. CentOS Updates (If Any)
2. Disabling SELinux
3. Reboot
4. Installation of Dependencies for Asterisk 11
5. Downloading your Asterisk Source Code
6. Extraction of Downloaded Files
7. DAHDI Installation
8. LibPRI Installation
9. Change Asterisk Directory
10. Run Configure Script for Asterisk
11. Install Sample Files
12. Start DAHDI
13. Start Asterisk

Each step is elaborated as under:

1. CentOS Updates


Update your CentOS 6 Server for any possible unimplemented updates.

yum update -y


2. Disabling SELinux

You can use any text editor (VIM etc) to commit this change. Go to /etc/selinux/config and change SELINUX=enforcing to SELINUX=disabled
This can also be done by using command line:
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config


3. Reboot

Once the aforementioned change is committed and the file is updated, reboot the system using:
reboot


4. Installation of Basic Dependencies

Asterisk 11.0.0 requires some prerequisite dependencies. Here is the command line to install them:
yum install -y make wget openssl-devel ncurses-devel newt-devel libxml2-devel kernel-devel gcc gcc-c++ sqlite-devel


5. Downloading Your Asterisk Source Code

Move to directory /usr/src by given command:
cd /usr/src/


and then download the Source Code tar balls using these commands (one by one or at a time):
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
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz


6. Extraction of Downloaded Files

Extract the downloaded tar balls to their corresponding directories using:
tar zxvf dahdi-linux-complete*
tar zxvf libpri*
tar zxvf asterisk*


7. DAHDI Installation

DAHDI (Digium Asterisk Hardware Device Interface) can be installed using the command line:
cd /usr/src/dahdi-linux-complete*
make && make install && make config


8. LibPRI Installation

In order to enable your BRI, PRI and QSIG based hardware, you will be needing PRI Library or LibPRI. You can install these libraries using:
cd /usr/src/libpri*
make && make install


9. Changing Asterisk Directory

Now you have to move back to the Asterisk Installation Directory:
cd /usr/src/asterisk*


10. Running Configure Script for Asterisk

At this point, you need to know your CentOS 6 Architecture (32 or 64 Bit). In many cases you are aware of it. In case you are not, try this command:

uname -a


For 32 Bit, you will be getting response like:
2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:23:01 EDT 2011 i686 i686 i386 GNU/Linux


For 64 Bit, system will respond with something like:
2.6.18-238.19.1.el5 #1 SMP Fri Jul 15 07:31:24 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux


Based on your OS Architecture, go ahead with these commands for Asterisk Configuration Script. For 32 Bit:
./configure && make menuselect && make && make install


For 64 Bit:
./configure --libdir=/usr/lib64 && make menuselect && make && make install


11. Installing Sample Files

Sample files are great resource specially for the newbies. Install Sample Files using:
make samples


Once done, add the Asterisk Install Script in directory /etc/init.d/ using:
make config


12. Starting DAHDI

To start DAHDI Device Drivers, use:
service dahdi start


13. Start Asterisk

Finally, start Asterisk:
service asterisk start


Do your stuff by connecting to the Asterisk Console:
asterisk -rvvv



And you're done.

Sincerely,

Photos Massos
PC Buddy
http://www.pcbuddy.co.uk

 
Was this article helpful? yes / no
Article details
Article ID: 5
Category: Knowledgebase
Date added: 2014-09-08 17:22:58
Views: 843
Rating (Votes): Article rated 3.1/5.0 (92)

 
« Go back

 
Powered by Help Desk Software HESK - brought to you by Help Desk Software SysAid