install asterisk 14 on CentOS 7
install asterisk 14 on CentOS 7
Step 1: Disable SELINUX
Modify /etc/sysconfig/selinux file, change SELINUX to disable and restart server.
# vi /etc/sysconfig/selinux
Change SELINUX=disabled
Step 2: Update system:
#yum update
Step 3: Installing Required Packages:
# yum install gcc gcc-c++ php-xml php php-mysql php-pear php-mbstring mariadb-devel mariadb-server mariadb sqlite-devel lynx bison gmime-devel psmisc tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver 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 php-process crontabs cronie cronie-anacron wget vim
Step 4: Setup MariaDB
#systemctl enable mariadb
#systemctl start mariadb
#systemctl status mariadb
#mysql_secure_installation
Step 5: Installing libjansson
# wget http://www.digip.org/jansson/releases/jansson-2.10.tar.gz
# tar -zxvf jansson-2.10.tar.gz
#./configure –prefix=/usr
#make clean
#make && make install
#ldconfig
Step 6: Installing Asterisk 14.4.0
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14-current.tar.gz
# tar -zxvf asterisk-14-current.tar.gz
# cd asterisk-14.4.0
# ./configure –libdir=/usr/lib64
6.1) Asterisk option Selection
# make menuselect
# contrib/scripts/get_mp3_source.sh
# make
# make install
# make samples
# make config
6.2) Setup Asterisk User
useradd -m asterisk
chown asterisk.asterisk /var/run/asterisk
chown -R asterisk.asterisk /etc/asterisk
chown -R asterisk.asterisk /var/{lib,log,spool}/asterisk
chown -R asterisk.asterisk /usr/lib64/asterisk
6.3) Setup Asterisk Database
# mysql -u root -p
create user ‘asterisk’@’localhost’ identified by ‘abc@10.3.12.11’;
create database asterisk;
create database cdrdb;
GRANT ALL PRIVILEGES ON asterisk.* TO asterisk@localhost IDENTIFIED BY ‘abc@10.3.12.11’;
GRANT ALL PRIVILEGES ON cdrdb.* TO asterisk@localhost IDENTIFIED BY ‘abc@10.3.12.11’;
flush privileges;
6.4) Start Asterisk
systemctl restart asterisk
systemctl status asterisk
asterisk -rvvv