How to install Asterisk on CentOS server

Asterisk is an open source PBXi, telephony engine, and telephony applications toolkit. Available for free. URL: asterisk.org.

CentOS is a Linux distributions based on Red Hat Enterprise. URL: centos.org.

The following required before we begin installation:
[*] CentOS minimal install
[*] kernel-devel / kernel-smp-devel
[*] bison
[*] openssl-devel

Installation:

We will use atrpms repo for this install.

Login via SSH using root to the server.

Create the following file:
/etc/yum.repos.d/atrpms.repo

Put the following in it:
[atrpms]
name=CentOS $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
gpgkey=http://atrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1

Or you can download the file [url=/files/page/atrpms.repo]here[/url] and save it as /etc/yum.repos.d/atrpms.repo.

We need to update the server, do:
yum -y upgrade

If that does not work for you, try:
yum -y update

Repeat the update until no more update left.

Install asterisk:
yum install asterisk

You will get something like:
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package asterisk.i386 1:1.4.9-43.el5 set to be updated
--> Running transaction check
...
...
...
Installing: asterisk ######################### [6/6]

Installed: asterisk.i386 1:1.4.9-43.el5
Complete!

Note: do not rely on above output, I’ve cut some part of it. Most likely your output will be different than mine.

You will need to configure a few things:
nano /etc/asterisk/sip.conf
nano /etc/asterisk/extensions.conf

We are done.

Start asterisk:
/etc/init.d/asterisk start

Good luck!

Tagged with 
About sepedatua
I am nothing special, of this I am sure. I am a common man with common thoughts and I’ve led a common life. There are no monuments dedicated to me and my name will soon be forgotten, but I’ve loved another with all my heart and soul, and to me, this has always been enough.

This site uses Akismet to reduce spam. Learn how your comment data is processed.