From the previous "Basic Information" tutorial, you should now have the source code for Asterisk. To continue with the general installation, we need to compile these sources to create the binaries.

Compiling Asterisk on most Linux distributions

Accomplish this by opening the folder in which the source codes were extracted (if you are using tarball files), or go to the /usr/src/asterisk folder (if using CVS server) to get the required packages.

To go to this directory, see example:

#cd /usr/src/asterisk

Once here, the final step is to compile:

Important: Follow this installation order: libpri, zaptel, asterisk

-Installing libpri

#cd /usr/src/asterisk/libpri
#make clean
#make
#make install

-Installing zaptel

#cd /usr/src/asterisk/zaptel
#make clean

Note: If you are using kernel 2.6 enter the following command '#make linux26', before doing '#make install'.

#make install

-Installing asterisk

#cd /usr/src/asterisk/asterisk
#make clean

Note: If you want to use a mp3 files for music-on-hold enter the following command '#make mpg123', before doing '#make install'.

#make install

If this is your first installation perform 'make samples' to install sample configuration files.

Follow the steps described in the next tutorial to learn how to install Asterisk on Debian

faheem (faheemahmed007 at gmail dot com)19 July 2007 19:23:23hi
i have the Problem in Receiving call when i receive the call i am not able to listen the
coustomer's voice But my voice is going. i don't know waht wrong Plz Help Me thanks

faheem ahmed

Sajid Mahmood (sajidm28 at hotmail dot com)27 June 2007 16:11:00i have the Problem in Receiving call when i receive the call i am not able to listen the coustomer's voice But my voice is going. i don't know waht wrong Plz Help Me.

Thameur (ismailthameur at yahoo dot fr)31 May 2007 14:34:11Bonjour,
please help me to resolve me problem on fedora6. so when i make zaptel-1.2.0-beta1 an error:
you do not appear to have the sources for the 2.6.18-1.2798-fcxen kernel installed:

make *** [linux26] Erreur1

what can i do?

thank you.

Anuj (kamatanuj at gmail dot com)15 March 2007 11:06:47I have 2 offices and each office as about 25-50 people working.. Can i setup asterisk at both the locations and connect the 2 asterisk servers over the internet to set up intra office communication.
Can asterisk be used to connect to an existing EPBX which i use for inter office communication.

Would be a great help if some one can reply to this query or email me at kamatanuj@gmail.com

perry (af_esteban at hotmail dot com)23 January 2007 22:19:22i'm trying to install asterisk 1.4.0 inside directory when i type 'make install' the log file show error1 "the configure script must be executed before running 'make'" i'm just start to use fedora i don't know why is wrong

Javier (pjbalbuena at hotmail dot com)21 December 2006 19:43:38Could you give me some tip's accoding to install asterisk on Windows

vix (dragons_tiger_downcast at yahoo dot com)01 November 2006 05:16:48advantages of running asterisk in your computer system

vicky (dragons_tiger_downcast at yahoo dot com)01 November 2006 05:13:42how to configure GUI based and install the manager api using asterisk sip

Frankie (frankie at nospam dot com)16 October 2006 05:01:05This tutorial is incomplete! It should be a step by step walk through, and it is nowehere close to that. !

ademola (adebayoadetoye at yahoo dot co dot uk)09 October 2006 10:48:50when making a call the voice of the call can not be haeir and the caller can not heir me due to the fantting.

hadukin (ramoulic at gmail dot com)02 October 2006 11:59:12please help if somebody could, Im having this error during my installation, I'm using Red Hat Linux 9

Timothy (musoket at mtn dot co dot ug)28 June 2006 11:09:19Hi.
No one seems to be giving a solution to this problem:
How I can solve this problem?
I have this final line when error happend

checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
configure: error: termcap support not found
make: *** [editline/libedit.a] Error 1

I have the same problem on SUSE 10 and would be grateful if someone out there could help.

manu (mutuswamy at gmail dot com)03 May 2006 02:39:27hello, i want to know about the basic function of pbx, overview block diagram, how it works etc. Please tell me about that all
THANKS

charly (charlybkl at yahoo dot fr)19 April 2006 22:38:23 i have installed asterisk-1.. when i try to laucched asterisk i
got the message:
== Parsing '/etc/asterisk/asterisk.conf': Found
Running as group 'asterisk'
Running as user 'asterisk'
== Parsing '/etc/asterisk/extconfig.conf': Found
Asterisk 1.2.7.1, Copyright (C) 1999 - 2006 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'show license' for details.
=========================================================================
== Parsing '/etc/asterisk/logger.conf': Found
Apr 19 20:28:37 ERROR[8033]: logger.c:625 init_logger: Unable to create event log: Permission denied

i connected as root

Raghu (Raghu_Kammarchedu at satyam dot com)15 March 2006 11:12:59i have installed asterisk-1.0.9.and express talk soft phone but i am getting message on console like this

I would be very gratefull , if i get any solution regarding this problem .

Thanks & Regards,

Ravi Sajjan

/bin/sh: restorecon: command not found (geecox at gmail dot com)06 January 2006 15:24:00While executing 'make install' during the zaptel install, the installer script came out with this error:
/bin/sh: restorecon: command not found
Using some of the comments in this page, I figured out that the entry /usr/sbin was missing in my $PATH environment variable, so I logged out and entered AS ROOT (su - ) instead of switching from my unauthorized user to root (su). Typing su - instead of only su would set the environment variables correctly and the installer script wouldn't fail anymore.

Jerry Cox

David Medina (pcvoxdm at telcel dot net dot ve)29 December 2005 17:32:10I have installed asterisk in a computer with linux suse9.3. It compiled with no problem. But I do not understand the part of configuring the [general] in sip.conf

I don't know how to configure a sip proxy server in the computer or is asterisk already the sip proxy server? I am absolutly confused.
Can I use a sip softphone in the same computer were asterisk is installed?

Appreciate your help

David Medina

zoa (support at asteriskguru dot com)22 December 2005 17:51:45

remove /usr/lib/asterisk/modules before doing a make install, i think this is an old module from a previous installation

Vijay Kumar Raju (vijay dot raju dot k at gmail dot com)20 December 2005 18:08:54i installed Astrisk with all the supporting packages. but when i run "asterisk -vvvc"

Joel (fox dot misionero at gmail dot com)15 December 2005 22:23:08How I can solve this problem?
I have this final line when error happend

checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
configure: error: termcap support not found
make: *** [editline/libedit.a] Error 1

Your Asterisk modules directory, located at
/usr/lib/asterisk/modules
contains modules that were not installed by this
version of Asterisk. Please ensure that these
modules are compatible with this version before
attempting to run Asterisk.

Mark Ellis (mellis at enpointe dot com)02 December 2005 00:14:41I found my problem I did not have gcc compiler once I installed it everything went fine.

Mark Ellis (mellis at enpointe dot com)01 December 2005 02:35:24When I get to the make clean and make install steps I get these errors what do I need to do? I am running Centos 4.2 the kernel is 2.6.9-22.EL

Anatoliy (support at asteriskguru dot com)24 November 2005 15:15:47To be able to compile zaptel, you have to download the linux kernel sources - you need the source code for the 2.6.8.

Try to download it via the 'apt-get'.

The same problem but with linux kernel 2.6.12-1 was solved with:
apt-get install linux-source-2.6.12

bob (bob_jv at hotmail dot com)23 November 2005 22:10:39Hi I went through the whole process of downloading the CVS like in the basic informatin section, created an asterisk folder and ran the cvs checkout command to get files. Got my folders for libpri, zaptel and asterisk. Ran the make clean, make, and make install in libpri folder no problems that I can see. When I went to the zaptel folder and ran make clean, make linux26 (I'm running debian 2.6.8-2-686), and then make install and I get an error.

This is the error:
You do not appear to have the sources for the 2.6.8-2-686 kernel installed. [linux26] Error 1

What exactly does this mean? Do I need to download the zaptel files again? Or are the ones I downloaded not up to date, and if now where can I get up to date source files. Thx.

John Hare (jhare at earthlink dot net)22 November 2005 22:32:38To answer HAN Wei's question:
The "make install" crashes on the
"restorecon not found error". Error 127
This is how I fixed this problem:

Do a set from your terminal session.
Scroll upwards in the terminal session until you can find the
PATH environment variable data displayed.
In the PATH environment variable you will probably find a path that
does not exist for doing your makes in your home directory.
For me the last path was as follows:

:/home/jhare99/bin

Unfortunately this path did not exist so I created it.

mkdir /home/jhare99/bin

Of course that was not enough.
So now go and find "restorecon" on your system.
It is probably in /usr/sbin.
Copy restorecon to this last path in your PATH:

cp /usr/sbin/restorecon /home/jhare99/bin

To ensure you can execute this utility do the following:
cd /home/jhare99 bin
chmod 777 restorecon
chown root:root restorecon

I know the chmod 777 is overkill but it works.
Run the "make install" again logged on as the root
$su root
$Password: ******
#make install

Roi (roixurxo at gmail dot com)07 November 2005 12:42:30While i'm compiling asterisk, make this error:
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
configure: error: termcap support not found
make: *** [editline/libedit.a] Error 1

Avinesh Naidoo (avinesh at ecntelecoms dot com)26 October 2005 10:25:49Hi i have always installed Zaptel then Libpri then asterisk , it seemed to have worked , I was jus wondering as to why you feel its important to install libpri then zaptel then asterisk ?

jsoul (jsoulsby at gmail dot com)20 October 2005 03:57:23If you guys need help with editing this content, I offer my assistance for free. This information is awesome as I am trying to learn Asterisk.

I can tell that english is not this person's first lanquage.

Eduardo (ducorrea at gmail dot com)12 October 2005 23:56:52Hi!
I have a Conectiva Linux Kernel 2.6.11 and I'm trying to install Asterisk 1.0.9.
I compiled libpri, but when I "# make linux26" (zaptel) and think is fine, the end is so BAD! :(

Anatoliy (support at asteriskguru dot com)07 October 2005 20:14:55Hello Sebastian,
For the libpri installtion, at hte end of the compiling do you see any errors ? Because this messages are normal for the installation of libpri.

For the zaptel probelm:
make: *** [zttool] Error 1

You have to install the package: libnewt-dev
in order to compile the zttool.

Sebastian (sebbo_f at gmx dot de)06 October 2005 15:29:48Hey, it's me again.
Same on zaptel. Suse is running on Kernel2.6 right?
So i tried make linux26 and this happened:

zoa (support at asteriskguru dot com)23 June 2005 10:52:50We are working on more tutorials, such as extensions.conf (is going to be a long one), echo cancellation, realtime with mysql, faxing, load testing, ....

But these things take a lot of time to make :/

patel (some at someplace dot com)22 June 2005 23:12:51why isn't there a tutorial for the dialplans and extensions? as theses are the most confusing to setup...
i've been tryin to figure out the dial plan for about 2 weeks now to no avail =(

real email injun at whoever dot com

Add Comment

Name:

Email:

Comment:

In order to prevent automatic posting on our website, we kindly request you to type in the number you see in the picture below.