Skip to content

Script to Install Asterisk 1.4.44 on CentOS 6.x Rackspace Cloud

by Jon on November 18th, 2013

Asterisk version 1.4.x is a bit old and outdated but I still like to use that version when testing. Since most of my Asterisk install scripts were for CentOS 4.x I went ahead and updated my script to work on CentOS 6.x and made sure it worked on Rackspace cloud too. Below are the prerequisites and the script.

yum -y update
yum -y groupinstall base "Development tools" "MySQL Database client" "MySQL Database server"
yum -y install ncurses-devel

Once all the updates and prerequisites complete installing restart the server.

wget http://jonathanmanning.com/wp-content/uploads/2013/11/asterisk-install-script-1.4.txt
chmod 755 asterisk-install-script-1.4.txt
./asterisk-install-script-1.4.txt

asterisk-install-script-1.4

cd /usr/src/
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/dahdi-tools-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-1.4.44.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-addons-1.4.13.tar.gz
wget http://jonathanmanning.com/wp-content/uploads/2009/10/cdr_mysql.conf.txt
wget http://jonathanmanning.com/wp-content/uploads/2009/10/asteriskdatabasefull.sql.txt
tar zxf dahdi-linux-current.tar.gz
tar zxf dahdi-tools-current.tar.gz
tar zxf libpri-1.4-current.tar.gz
tar zxf asterisk-1.4.44.tar.gz
tar zxf asterisk-addons-1.4.13.tar.gz
cd /usr/src/dahdi-linux-*/
make
make install
echo "######### DAHDI Linux: Installed #############################"
cd /usr/src/dahdi-tools-*/
./configure
make
make install
make config
echo "######### DAHDI Tools: Installed ##############################"
cd /usr/src/libpri-*/
make
make install
echo "######### Libpri: Installed ##############################"
cd /usr/src/asterisk-1*/
./configure
make
make install
make samples
make config
chkconfig asterisk on
echo "######### Asterisk: Installed #############################"
cd /usr/src/asterisk-addons*/
./configure
make
make install
echo "######### Asterisk Addons: Installed #############################"
sed -i 's/enforcing/disabled/g' /etc/selinux/config
sed -i 's/permissive/disabled/g' /etc/selinux/config
cd /usr/src/
chkconfig mysqld on
service mysqld start
mysqladmin -u root password 'pick@p@$$w0rd'
mysql -u root -p'pick@p@$$w0rd' < asteriskdatabasefull.sql.txt rm -f /etc/asterisk/cdr_mysql.conf cp /usr/src/cdr_mysql.conf.txt /etc/asterisk/cdr_mysql.conf echo "######### Database Setup ############################" cp /usr/src/asterisk-*/contrib/init.d/rc.redhat.asterisk /etc/init.d/asterisk chmod 755 /etc/init.d/asterisk echo "######### Asterisk Installed as Service ############################" echo "date >> /var/log/server_restart.log " >> /etc/cron.weekly/hardreset
echo "echo reboot server >> /var/log/server_restart.log " >> /etc/cron.weekly/hardreset
echo "shutdown -r now " >> /etc/cron.weekly/hardreset
chmod 755 /etc/cron.weekly/hardreset
echo "######### Weekly Server Reboot ############################"

From → Linux, VOIP

2 Comments
  1. nav permalink

    Heartiest thanks to u for this but i have a query that if i have to enable g723 and g729 codec in this then what i have to do next ?
    i am novice in this field plz help me out of it.
    thanx again

    • Hello Navneet,

      Thanks for the kind comment and I would certainly like to help you install the g729 codec. I haven’t created a post on this so if you would like to get directions I have created a great course on how to install and configure Asterisk which includes a section on the g729 codec.

      I can offer you a huge discount since it is still very new and I am hoping I can get some of my readers to write a public review for me.

      Here is a link to the course with a 95% off discount.

      https://www.udemy.com/how-to-install-asterisk-on-centos-linux-video/?couponCode=LINKEDIN1

      Regards,

      Jon Manning

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS

%d bloggers like this: