This guide explains step by step how to install Asterisk on CentOS 6 / RHEL 6 x86_64. I have also included a video tutorial, if you run Ubuntu server then check out my Ubuntu Asterisk 10 Tutorial.
Asterisk is an enterprise level telephone system that uses real desk phones capable of seamlessly calling normal phones. An Asterisk VoIP PBX can connect to existing ISDN30e / POTS telephone lines or over the Internet via a ITSP using SIP IAX protocols.
This tutorial assumes you have a working CentOS 6 (or RHEL) server instance to work with, if you don’t follow my guide on how to install CentOS, use the minimal server install as suggested.
I Don’t use GUI’s (especially on Asterisk Servers)
I do not install a GUI (X Windows or web based) on Asterisk servers, it’s a waste resources and is simply not required. So just to be clear, this tutorial will walk you through the installation of a minimal CentOS / RHEL instance running Asterisk, this is not a guide for setting up Trixbox or Elastix.
I have tried using other GUI based distro’s over the years, such as Trixbox & Elastix (my thought being I could train other admin’s to use the inteterface), however I found them more trouble and far less reliable.
Asterisk CentOS 6 Install Guide (Asterisk 1.8)
Before we install Asterisk on CentOS we need to update the system & reboot:
Install wget to pull down Asterisk:
Download Asterisk 1.8 & DAHDI Tools:
Asterisk & DAHDI Tools need extracting, to extract the tar.gz
Install dependencies so we can compile Asterisk 1.8
Your Asterisk 1.8 deps should look similar to:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
Next, install Perl & Ncurses Development
Build DAHDi Tools
It’s crucial that you build DAHDi first so that you can build Asterisk with support for confrence rooms & other DAHDI specific functionality:
1 2 3 4
For this tutorial I am only going to be using SIP trunks. If you have are using cards / hardware you might want to check out /etc/dahdi/system.conf and /etc/asterisk/chan_dahdi.conf
Start DAHDi at Boot:
Build Asterisk 1.8 on CentOS
Time to build Asterisk!
1 2 3
Configure your Asterisk Server options and install:
1 2 3
Install sample config files in /etc/asterisk and set Asterisk to start at boot:
1 2 3
Stop Asterisk Core with:
If Asterisk does not run chances are you made a mistake, it happens. Check you have followed my guide exactly and start again from scratch if necessary.
Now you know Asterisk runs correctly you can start the service with: