#!/bin/bash
function _checks {
cat /etc/*release | grep -q 'CentOS Linux release 8' || exit 1
}
function _process {
echo Updating...
yum update -y
echo Installing Devel and Dependencies
yum install -y wget gcc gcc-c++ make patch bzip2 libxml2-devel dnf-plugins-core sqlite sqlite-devel tar rsync && \
echo Enabling Power Tools && \
dnf config-manager --set-enabled powertools
echo Installing more devel
yum install -y libedit-devel uuid-devel libuuid-devel && \
echo Downloading Asterisk 18.4 && \
wget -O /opt/asterisk-18.4.0.tar.gz https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18.4.0.tar.gz && \
cd /opt && \
echo Unpacking ... && \
tar -zxvf ast*tar.gz && \
cd asterisk-18.4.0 && \
echo Configuring... && \
./configure --with-jansson-bundled --prefix=/ && \
echo Making... && \
make && \
echo Make install ing
make install && \
make samples && \
echo 'Install Asterisk 18.4 on CentOS 8 successful' && \
exit 0 || \
echo '$0 Install asterisk 18.4 unsuccessful' ; exit 1
}
_checks && _process || exit 1
|