Code Ghar

How to install Asterisk on CentOS? Package installation.

Posted in configuration by Sh on March 8, 2009

Follow these steps to install Asterisk (Open source PBX) on CentOS.

Step 1.

Make sure following packages were installed on CentOS/

  • kernel-devel OR kernel-smp-devel
  • bison
  • openssl-devel

To installed above packages run following commands

sudo yum install kernel-devel
sudo yum install bison
sudo yum install openssl-devel

Step 2.

Now add atrpms repository for Asterisk Installation

  • Create the file called atrpms.repo
sudo vim /etc/yum.repos.d/atrpms.repo

put following in the file

[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

Step 3.

Run update command

sudo yum -y update

Step 4.

Now run following command to installed Asterisk

sudo yum install asterisk

After installation completed run following commands to check Asterisk status.

To check Asterisk Status

sudo /etc/init.d/asterisk status

To Start Asterisk

sudo /etc/init.d/asterisk start

To Stop Asterisk

sudo /etc/init.d/asterisk stop

To Restart Asterisk

sudo /etc/init.d/asterisk restart

5. Asterisk CLI

Go to asterisk directory and then use command -rvvv

                      cd /etc/asterisk/
                      asterisk]# asterisk -rvvvv

where ‘v’ indicates verbosity


Good Luck!

Reference:

How to install Asterisk on CentOS server

Tagged with: ,

4 Responses

Subscribe to comments with RSS.

  1. weave said, on March 11, 2009 at 1:39 am

    I got all excited by this, but checked http://atrpms.net/dist/el5/ and see it only has 1.2 or 1.4 packages. I’m using 1.6 :-(

  2. Sh said, on March 11, 2009 at 2:42 am

    Thanks weave;
    This repository have the stable version of asterisk and for those who do not want to download asterisk code and compile by themselve.

    By the way if you have package installation repository link for Asterisk 1.6 please post it.

    Cheers
    Sh

  3. Jim said, on July 8, 2009 at 12:58 am

    I added the following lines to the repo name, which I labeled [asterisk] to avoid conficting packages:

    ==========
    disable=*
    enablepkg=*asterisk*,*dahdi*
    =========

    This way you can change from stable to bleeding or testing for asterisk only as well.

  4. hieu said, on August 22, 2009 at 8:10 pm

    Hi, I’ve install Asterisk on CentOS 4.5. It show successfully but in /etc/rc.d/init.d doesn’t have asterisk so that I can start or stop asterisk by the command below :
    /etc/rc.d/init.d/asterisk start
    /etc/rc.d/init.d/asterisk stop

    Have you ever met this problem ? Please tell my why, thank you.


Leave a Reply