Asterisk Linux Centos
Created by: jht2,Last modification on Mon 18 of Aug, 2008 [21:51 UTC] by ardentbiker
Page Contents
CentOS is one of serveral projects building freely distributable distributions based on Red Hat Enterprise Linux.
Installing CentOS for Asterisk
Based on Centos 4.1 for i386Required packages
- Minimal install
- kernel-devel / kernel-smp-devel
- bison
- openssl-devel
for mysql support (Asterisk sip mysql peers, Asterisk voicemail database, Asterisk cdr mysql etc) add
- mysql
- mysq-server
- mysql-devel
Installation process
Select minimal from the Package Group selector option (on Centos 4.1 this required just disk1 for my hardware - HP DL360 - G4)
When the installation completes, install the YUM GPG Key
- rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
Now simply install the required packages using yum
- yum -y install kernel-devel bison openssl-devel
- yum -y install kernel-devel bison openssl-devel mysql mysql-server mysql-devel
If you run an SMP kernel, you need kernel-smp-devel instead of kernel-devel above.
Now go make yourself a cup of tea/coffee as this will take a while, depending on your connection speed (it will download and install all dependencies and packages required)
Then:
- yum -y update
Once installed, standard asterisk installation procedure applies.
Installing Asterisk on to CentOS 4.x
Quick and Easy Install Guide, continuing from above section.>>> If you are running an SMP kernel, then instead of "kernel-devel" use "kernel-smp-devel"<<<
>>> MySQL is optional, MenuSelect requires 'ncurses-devel' if you want to set extra options. <<<
Install prereqs:
yum -y update
yum -y install gcc gcc-c++ libtermcap-devel kernel-devel bison openssl-devel mysql mysql-server mysql-devel
#installing/upgrading asterisk
#clean modules - just in case this is an upgrade.
rm -f /usr/lib/asterisk/modules/*
Go fetch latest asterisk sources. If you get "404" errors, chances are that there
are newer versions. Please update this page. (Yes, I know about /releases ,
and I avoided using it to keep this page up-to-date)
/usr/src
rm asterisk
wget http://ftp.digium.com/pub/asterisk/asterisk-1.4.21.2.tar.gz
tar -zxvf asterisk-1.4.21.2.tar.gz
ln -s asterisk-1.4.21.2 asterisk
rm -f zaptel
wget http://ftp.digium.com/pub/zaptel/zaptel-1.4.11.tar.gz
tar -zxvf zaptel-1.4.11.tar.gz
ln -s zaptel-1.4.11 zaptel
rm -f libpri
wget http://ftp.digium.com/pub/libpri/libpri-1.4.7.tar.gz
tar -zxvf libpri-1.4.7.tar.gz
mv libpri-1.4.7 libpri
rm -f asterisk-addons
wget http://ftp.digium.com/pub/asterisk/asterisk-addons-1.4.7.tar.gz
tar -zxvf asterisk-addons-1.4.7.tar.gz
mv asterisk-addons-1.4.7 asterisk-addons
Should be run before building asterisk: (NOTE: You may need to reboot if you see errors about missing kernel sources)
cd /usr/src/zaptel
./configure
# make menuselect
make install
make config
Optional: If you have Zaptel digital cards:
cd ../libpri
make clean
make install
Must be installed after zaptel and (if you need it) libpri:
cd ../asterisk
./configure
# make menuselect # for extra configuration
make
make install
make samples
make config
Optional. Should be run after installing Asterisk:
cd ../asterisk-addons
./configure
make
make install
Reported Issues
- Guide to installing Asterisk CentOS-4.0 Zaptel
- mISDN rumoured not to work on CentOS and other RHEL based distros. Information on Trixbox discussion forums, and on Beronet's mailing list archive.
- Note : In my installation I did not have any digium (or clone) hardware so I did not compile zaptel, my attempts to build ztdummy failed as the make file complained about kernel-source not being installed. Any clues? (added by hfwang oct 6th 05: try creating a symlink called /usr/src/linux-2.6 or linux-2.4 to your kernel sources) "try getting kernel-devel — Bud"
Other Sources of Documentation
- AussieVoip's detailed guide to installing Asterisk and FreePBX on CentOS
Packaged RPM's
- For packages see ATrpms
- Consider the benefits of the well documented installation process of compiling from source.
Trixbox
For a full, bleeding edge Asterisk installation with many additional packages based on CentOS consider Trixbox, formerly known as Asterisk at Home. Trixbox is now associated with Fonality (Oct 06).Asterisk OS Platforms
http://www.centos.org/
Asterisk at Home

Comments
333termcap support not found
configure: error: *** termcap support not found
then run this:
yum install libtermcap libtermcap-devel newt newt-devel ncurses ncurses-devel
333CentOS 4.4
configure: error: C\+\+ preprocessor "/lib/cpp" fails sanity check
then run this:
yum install gcc-c++ compat-gcc-32 compat-gcc-32-c++
333
333This Dont work if you dont have a card
make sure you have the kernel-devel.
And also try to research about the bug on spinlock.h
good Luck guys
333Need GCC too!
yum -y gcc
Also needed kernel-devel to build zaptel (for ztdummy)
yum -y kernel-devel
333