Saturday, November 21, 2009

Installing Asterisk on CentOS5

Either via Yum or Source

YUM
1)Create these files in /etc/repos.d

asterisk.repo

[asterisk-tested]
name=CentOS-$releasever - Asterisk - Tested
baseurl=http://packages.asterisk.org/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium

[asterisk-current]
name=CentOS-$releasever - Asterisk - Current
baseurl=http://packages.asterisk.org/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium

Create digium.repo

[digium-tested]
name=CentOS-$releasever - Digium - Tested
baseurl=http://packages.digium.com/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium

[digium-current]
name=CentOS-$releasever - Digium - Current
baseurl=http://packages.digium.com/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium



2)yum -y install asterisk16 asterisk16-configs asterisk16-voicemail dahdi-linux dahdi-tools libpri iksemel.i386 iksemel-devel.i386

OR


Source


path_root="/usr/src/asterisk"
filez=`ls -1 $path_root/*tar.gz`

mkdir /usr/src/asterisk
`cd $path_root`

wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.4.27.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.2.0.2+2.2.0.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.10.2.tar.gz

for tarballs in $filez
do
clear
echo "Now Extracting ---- $tarballs"
sleep 1
#`tar -zxvf $tarballs -C $path_root`
tar -zxvf $tarballs -C $path_root
echo "Done"
sleep 1
done


#Now start compiling and installing packages

#Let's start off with DAHDI

cd dahdi-linux-complete*
echo "Now installing DAHDI HardWare Interface Drivers"
make && make install & make config && sleep 1
echo "DONE"
cd ..


#Let's install LibPRI
cd libpri*
echo "Now installing LibPRI"
make && make install
echo "DONE"
cd ..


#Install GTALK Modules
yum install iksemel.i386 iksemel-devel.i386

#Let's install Asterisk
cd asterisk-1.*
echo "Now installing Asterisk"
./configure && make && make menuselect && make install && make samples && make config && sleep 1
echo "DONE"
cd ..

No comments:

Post a Comment

Followers