How to install Asterisk on CentOS? Package installation.

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

name=CentOS $releasever - $basearch - ATrpms

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!


How to install Asterisk on CentOS server

7 Responses to How to install Asterisk on CentOS? Package installation.

  1. weave says:

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

  2. Sh says:

    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.


  3. Jim says:

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


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

  4. hieu says:

    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.

  5. Anonymous says:

    would this not just be a case of creating a link in init.d/ that points to the asterisk folder?

  6. Abdoulaye Assoumane Abou says:

    pls i have install centos and i am using asterisk with it but i cannot add users and open the sip.conf and extensions.conf files

  7. Amit says:

    give the basic command of centos

%d bloggers like this: