Archive for July, 2009

Installing Asterisk on Ubuntu Server 9.04

July 28th, 2009 5 comments

There are numerous sites and install guides out there detailing how to set-up Asterisk on Ubuntu. However most are either overly complicated, going into far too much detail for the purpose of installation, and others or not detailed enough, missing out steps and descriptions.

Here is my attempt at writing a usable guide…

Note: The text in quotes (like this) can be copied directly to the command line.
If there are multiple lines do them one at a time.

1)  System Set-up

I am assuming you have a fresh installation of Ubuntu 9.04 Server, if not you may already have these packages installed.

Ok, the first thing we need to do is get a few packages:

apt-get install subversion make linux-source kernel-package

We then need to get the “linux-kernel-headers” package. This is done in two steps:

apt-get install linux-kernel-headers

This command should return a message something like this:

Package linux-kernel-headers is a virtual package provided by:
 linux-libc-dev 2.6.28-13.45
You should explicitly select one to install.

So go ahead and install the suggested package:
(Remember to drop the version info ‘2.6.28-13.45’)

apt-get install linux-libc-dev

Next we need to install “linux-headers”. Again this is in two steps:

apt-get install linux-headers

You should get a message back similar to:

Package linux-headers is a virtual package provided by:
 linux-headers-2.6.28-13-server 2.6.28-13.45
 linux-headers-2.6.28-13-generic 2.6.28-13.45
 linux-headers-2.6.28-13 2.6.28-13.45
 linux-headers-2.6.28-3-rt 2.6.28-3.12
 linux-ports-headers-2.6.28-6 2.6.28-6.20
 linux-headers-2.6.28-6-386 2.6.28-6.20
 linux-headers-2.6.28-11-server 2.6.28-11.42
 linux-headers-2.6.28-11-generic 2.6.28-11.42
 linux-headers-2.6.28-11 2.6.28-11.42
You should explicitly select one to install.

Install the two “server” packages:

apt-get install linux-headers-2.6.28-13-server
apt-get install linux-headers-2.6.28-11-server

We then need to install a few more packages:

apt-get install libconfig-tiny-perl libcupsimage2 libcups2 libmime-lite-perl libemail-date-format-perl libfile-sync-perl libfreetype6 libspandsp1 libtiff-tools libtiff4 libjpeg62 libmime-types-perl libpaper-utils psutils libpaper1 ncurses-dev libncurses-dev libncurses-gst ncurses-term libnewt-dev libnewt-pic libxml2 libxml2-dev libspandsp-dev libspandsp1

2) Install Asterisk

First move to the correct directory:

cd /usr/src/

Now we can check out the source files:

svn co asterisk
svn co dahdi-kernel
svn co dahdi-tools
svn co libpri

We can then build them, starting with “libpri”:

cd /usr/src/libpri
make clean
make install

Then “DAHDI kernel”:

cd /usr/src/dahdi-kernel
make clean
make install

Then “DAHDI tools”:

cd /usr/src/dahdi-tools
make clean
make install
make config

And finaly “Asterisk”:

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

That should be it, restart the server and away you go. All you have to do next is configure Asterisk (that is for another post)…

Categories: Asterisk, Linux, Ubuntu Tags: