|
There’s 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’s a dozen different distros (or flavors) of Linux that Asterisk will run on. Many have successfully got it running on Debian, Ubuntu, Fedora, 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 mininum 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 updated.
Now we’re to the fun part. At the time of this writing, the latest version of Asterisk was: 1.4.13, so I’m going to be using this during this guide. So you’re all rebooted and back at the command line. Here’s 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’s many discussions out there that support the fact that installing Zaptel will “somehow” improve your Asterisk experience. Plus you’ll be ready if you ever decide to install a FXS/FXO Card. Which by the way, in this guide, I’m setting up a pure voip Asterisk setup, so there’s no need for FXS/FXO Cards.
STEP 3: Installing Asterisk
So now we’re 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 I’ll 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.
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/
|