How to install asterisk 16 on centos 7
How to install asterisk 16 on centos 7?
Install Asterisk 16 on CentOS 7
Before you start executing Asterisk install commands on your CentOS 7 server, make sure all the package son the system are up to date.
sudo yum -y update
Set Hostname:
sudo hostnamectl set-hostname pbx.example.com
Add EPEL repository
sudo yum -y install epel-release
Set SELinux in Permissive Mode by running the commands below:
sudo setenforce 0
sudo sed -i 's/\(^SELINUX=\).*/\SELINUX=permissive/' /etc/selinux/config
Then follow the steps below to install and configure Asterisk 16 on your CentOS 7 / Fedora server.
Step 1: Install Asterisk 16 PBX dependencies
The initial step when setting up Asterisk is to install all required dependencies.
sudo yum -y install wget vim net-tools
You also need to install Development Tools group packages.
sudo yum -y groupinstall "Development Tools"
The other packages that you need to install are:
sudo yum -y install libedit-devel sqlite-devel psmisc gmime-devel ncurses-devel libtermcap-devel sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel uuid-devel libtool libuuid-devel subversion kernel-devel kernel-devel-$(uname -r) git subversion kernel-devel crontabs cronie cronie-anacron wget vim
Step 2: Download and Install Jansson
Jansson is a C library for encoding, decoding and manipulating JSON data. Download and install it on CentOS 7 server by running the commands below:
cd /usr/src/
git clone https://github.com/akheron/jansson.git
cd jansson
autoreconf -i
./configure --prefix=/usr/
make && make install
Step 3: Download and Install PJSIP
PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. Clone the project from Github, then compile and install.
cd /usr/src/
export VER="2.10"
wget https://github.com/pjsip/pjproject/archive/${VER}.tar.gz
tar -xvf ${VER}.tar.gz
cd pjproject-${VER}
./configure CFLAGS="-DNDEBUG -DPJ_HAS_IPV6=1" --prefix=/usr --libdir=/usr/lib64 --enable-shared --disable-video --disable-sound --disable-opencore-amr
make dep
make
make install
ldconfig
Step 4: Download and Install Asterisk
Now that we have all dependency packages installed, we should be ready to download and install Asterisk 16 on CentOS 7
cd /usr/src/
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz
tar xvfz asterisk-16-current.tar.gz
cd asterisk-*
./configure –libdir=/usr/lib64
make menuselect
sudo contrib/scripts/get_mp3_source.sh
make
make install
make samples
make config
ldconfig
If any error regarding NOISE_BUILD or jansson , try this
./configure –libdir=/usr/lib64 NOISY_BUILD=yes –with-jansson-bundled
./configure --libdir=/usr/lib64