Upgrade 3CX to v18 and get it hosted free!

Asterisk Linux Centos

Author image

Page Contents

CentOS is one of several projects building freely distributable distributions based on Red Hat Enterprise Linux.

Installing CentOS for Asterisk

Based on Centos 4.1 for i386

Required 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

or to include mysql:

  • 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

Another cup of coffee, and a reboot to ensure that you compile against the correct kernel.

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

  1. installing/upgrading asterisk
  2. 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

  1. 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

  1. 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 rumored not to work on CentOS and other RHEL based distros. Information 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”

Packaged RPM’s

  • Consider the benefits of the well-documented installation process of compiling from source.

Installing Asterisk Using A Script

Here is a script that will install the latest source of Asterisk 1.4.x on a fresh install of CentOS 4.x. The script will also set up a daily restart of asterisk and reboot the box once a week. Also, other new features are slowly being adding to the script, to download the script and read about it go http://www.jonathanmanning.com/2009/11/12/how-to-install-asterisk-1-4-current-script-update/. Visit the blog for other asterisk tips and configuration examples. http://www.jonathanmanning.com

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 16 Compilation and Installation on Centos 7

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.