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