wesupport

Need help?

Our experts have had an average response time of 13.14 minutes in February 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Asterisk – My Quick Installation Guide

by | Nov 24, 2007

There is a dozen other quick installation guides for Asterisk. So why write another?
Well, unless you a Unix/Linux Guru you might find yourself confused when getting your Asterisk setup off the ground. Even if you are an experienced Linux user, you might find yourself running in circles trying to get that special feature working just so in Asterisk. So here it is, a straight forward beginners guide to Asterisk.

STEP 1: Choosing and Installing a Linux Distro

There is a dozen different distros (or flavors) of Linux that Asterisk will run on. Many have successfully got it running on Debian, Ubuntu, and CentOS. Many in the community like CentOS, and it’s the distro that you can install Asterisk on with the least of worries. So you can start by installing CentOS on your PC. For just initial testing of Asterisk, you can use any old hardware. I would suggest at least the following though: P3 1Ghz, 128mb Ram, 10GB Hard Drive, Ethernet Card. If you need assistance figuring out how to burn the CentOS ISO and/or installing CentOS, consult Google or post me a comment. I normally just install the bare minimum of CentOS or the Server Install. We can install the needed packages later.

STEP 2: Preparing System for Asterisk Installation

Asterisk requires certain packages in order to install and compile properly. Assuming that you are using CentOS, below is the yum command that you will need to issue from the command line.

rpm import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4

yum -y install screen kernel-devel kernel-source bison openssl-devel
mysql mysql-server mysql-devel gcc libtermcap libtermcap-devel newt
newt-devel zlib-devel ncurses-devel gcc-c++ compat-gcc-32 compat-gcc-32-c++

I normally reboot after installing the needed packages, and then run a “yum -y update” to make sure everything is update.

Now we are to the fun part. At the time of this writing, the latest version of Asterisk was: 1.4.13, so I am going to be using this during this guide. So you are all rebooted and back at the command line. Here is what needs to be done to download the Asterisk packages:

cd /usr/src/
ln -s /usr/src/kernels linux
rm -rdf asterisk*
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.13.tar.gz
tar -zvxf asterisk-1.4.13.tar.gz
mv asterisk-1.4.13 asterisk

rm -f asterisk-1.4.13.tar.gz
rm -rdf zaptal*
wget http://downloads.digium.com/pub/zaptel/zaptel-1.4.6.tar.gz
tar -zvxf zaptel-1.4.6.tar.gz
mv zaptel-1.4.6 zaptel
rm -f zaptel-1.4.6.tar.gz
rm -rdf libpri*
wget http://downloads.digium.com/pub/libpri/libpri-1.4.2.tar.gz
tar -zvxf libpri-1.4.2.tar.gz

mv libpri-1.4.2 libpri
rm -f libpri-1.4.2.tar.gz
rm -rdf asterisk-addons*
wget http://downloads.digium.com/pub/asterisk/asterisk-addons-1.4.4.tar.gz
tar -zvxf asterisk-addons-1.4.4.tar.gz
mv asterisk-addons-1.4.4 asterisk-addons
rm -f asterisk-addons-1.4.4.tar.gz
rm -rdf asterisk-sounds*
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-sounds-1.2.1.tar.gz

tar -zvxf asterisk-sounds-1.2.1.tar.gz
mv asterisk-sounds-1.2.1 asterisk-sounds
rm -f asterisk-sounds-1.2.1.tar.gz

Not all of the above are required to compile and/or run Asterisk. For example, Zaptel is primarily used if you are using an FXS/FXO Card. But there is many discussions out there that support the fact that installing Zaptel will somehow improve your Asterisk experience. Plus you will be ready if you ever decide to install a FXS/FXO Card. Which by the way, in this guide, I am setting up a pure voip Asterisk setup, so there is no need for FXS/FXO Cards.

STEP 3: Installing Asterisk

So now we are going to perform the standard install. Perform the following commands from the command line:

cd /usr/src/zaptel/
make clean
make install
make install
make config

cd /usr/src/libpri
make clean
make install

cd /usr/src/asterisk
make clean
./configure
make install
make config

cd /usr/src/asterisk-addons
make clean
make install
make install

cd /usr/src/asterisk-sounds
make install

In my experience, sometimes you have to run the make commands more than once, due to configuration requirements, etc. Look out for any error messages that come up during the compile. If you see any that actually stop the compile from completing, you can do a google search with those errors, hopefully it will return some results for you. Otherwise, put me a comment, and will see if I can help.
Once the above is all complete, I normally do one final reboot to sync everything up, so to speak.

That’s it! Asterisk is installed. You can download these commands (put neatly in a .txt document for quick copy and pasting) here.

Asterisk Installation Commands

Check back again for upcoming articles on getting Asterisk configured for use in a pure voip setup.


Articles by Robert Broyles

About the author:
Robert Broyles is Team Leader at the Bobcares Phone Support Center, Phoenix, AZ. While he is not busy managing the team and Phone support, Robert loves to tweak Asterisk systems. His blog can be found at http://hostseries.com/

 


3 Comments

  1. Bubby

    It is added now.

  2. james

    This link is no longer working sir, do you have alternative link where i could download that package? error displayed is 404: not found. I’m new to asterisk and just following what you wrote.

    Thanks in advance,
    -james

Categories

Tags