How to Install Asterisk 11 on CentOS 6
For
this install I am using Asterisk 11.0.0 and will be compiling from
source on CentOS 6.5. This tutorial should also work on Fedora and RHEL
(Red Hat Enterprise Linux) systems with little or no modification.
First, you will want to be sure that your server OS is up to date.
yum update -y
Disable SELinux by changing “enforcing” to “disabled” in /etc/selinux/config. Use a text editor or copy and paste this command.
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
After you update and disable SELinux, you’ll need to reboot.
reboot
Next, you will want to resolve basic dependencies. (More information on Asterisk dependencies.)
yum install -y make wget openssl-devel ncurses-devel newt-devel libxml2-devel kernel-devel gcc gcc-c++ sqlite-devel
Change into the /usr/src/ directory to store your source code.
cd /usr/src/
Download the source tarballs. These commands will get the current release of DAHDI 2.6, libpri 1.4 and Asterisk 11.
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-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/asterisk-11-current.tar.gz
OR
wget http://iindya.com/archive/packages/dahdi-linux-complete-current.tar.gz
wget http://iindya.com/archive/packages/libpri-1.4-current.tar.gz
wget http://iindya.com/archive/packages/asterisk-11-current.tar.gz
Extract the files from the tarballs.
tar zxvf dahdi-linux-complete*
tar zxvf libpri*
tar zxvf asterisk*
For the next set of commands it is important to follow the proper order: DAHDI first, then libpri, then Asterisk.
Install DAHDI.
cd /usr/src/dahdi-linux-complete*
make && make install && make config
Install libpri.
cd /usr/src/libpri*
make && make install
Change to the Asterisk directory.
cd /usr/src/asterisk*
In the next step, running the “configure” script will vary depending on whether your system is 32-bit or 64-bit. (Click here to know) When the menuselect command runs, select your options, then choose “Save and Exit” and the install will continue.
Use this command if you are installing Asterisk on 32bit CentOS.
./configure && make menuselect && make && make install
Use this command if you are installing Asterisk on 64bit CentOS.
./configure --libdir=/usr/lib64 && make menuselect && make && make install
Optional: If you ran into errors you will want to clean the install directory before recompiling.
make clean && make distclean
Once you have an error-free install, copy the sample files from the configs subdirectory into /etc/asterisk.
make samples
Then add the Asterisk start script to the /etc/init.d/ directory
make config
Start DAHDI.
service dahdi start
Start Asterisk.
service asterisk start
Connect to the Asterisk CLI.
asterisk -rvvv
Installing g.729 Codec
Move to the Asterisk modules directory. By default, it’s the following:
cd /usr/lib/asterisk/modules
Now
the tricky part, find out which binary you need to get the right module
for the right processor of your server. This almost always stumps me,
and I always end up downloading roughly two or three codecs before I get
the right one. Here’s something to help you out, so you don’t have to
make these mistakes:
uname -a
This let’s you know what type of server you got… But it’s reallllly complicated if you don’t know what you’re looking for!
Linux 2.boom.boom.pow.server 2.6.18-348.1.1.el5xen #1 SMP Tue Jan 22 17:00:37 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
Ok, so this will help you out ALOT MORE than the above. I don’t know what half of that stuff even means!!
cat /proc/cpuinfo
The above command will give you something like this:
[root@myserver ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
stepping : 10
cpu MHz : 1596.000
cache size : 3072 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips : 5866.85
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
stepping : 10
cpu MHz : 1596.000
cache size : 3072 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
Look at the section that tells you the model name, in my case it is:
model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
Next, visit http://asterisk.hosting.lv/#bin,
and from the right hand side, select the Asterisk version that you
need PLUS THE version that matches your processor. For me it was:
However, these are the more popular selections (odd, none of my servers run any of the below, but whatever)
http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-pentium.so
http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-x86_64-core2.so
Ok, so next, you want to download them and install them in the Asterisk modules directory
cd /usr/lib/asterisk/modules
wget http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-pentium.so
So
that installs (read downloads) the codec into the modules directory of
your Asterisk install. Now to activate it! Simply rename it to
codec_g729 and you should be good to go!!
mv codec_g729-ast14-gcc4-glibc-pentium4.so codec_g729.so
Next, to ensure that your codec took, and is now working fully with Asterisk, restart Asterisk then login to if it is show up:
service asterisk restart
asterisk -vr
core show translation
The above command will vary from each version of Asterisk. The above works for 1.10 and 1.11
You should see something akin to this:
Move to the Asterisk modules directory. By default, it’s the following:
cd /usr/lib/asterisk/modules
Now
the tricky part, find out which binary you need to get the right module
for the right processor of your server. This almost always stumps me,
and I always end up downloading roughly two or three codecs before I get
the right one. Here’s something to help you out, so you don’t have to
make these mistakes:
uname -a
This let’s you know what type of server you got… But it’s reallllly complicated if you don’t know what you’re looking for!
Linux 2.boom.boom.pow.server 2.6.18-348.1.1.el5xen #1 SMP Tue Jan 22 17:00:37 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
Ok, so this will help you out ALOT MORE than the above. I don’t know what half of that stuff even means!!
cat /proc/cpuinfo
The above command will give you something like this:
[root@myserver ~]# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz stepping : 10 cpu MHz : 1596.000 cache size : 3072 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm bogomips : 5866.85
processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz stepping : 10 cpu MHz : 1596.000 cache size : 3072 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
Look at the section that tells you the model name, in my case it is:
model name : Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
Next, visit http://asterisk.hosting.lv/#bin,
and from the right hand side, select the Asterisk version that you
need PLUS THE version that matches your processor. For me it was:
However, these are the more popular selections (odd, none of my servers run any of the below, but whatever)
http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-pentium.so
http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-x86_64-core2.so
http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-x86_64-core2.so
Ok, so next, you want to download them and install them in the Asterisk modules directory
cd /usr/lib/asterisk/modules
wget http://asterisk.hosting.lv/bin/codec_g729-ast14-gcc4-glibc-pentium.so
So
that installs (read downloads) the codec into the modules directory of
your Asterisk install. Now to activate it! Simply rename it to
codec_g729 and you should be good to go!!
mv codec_g729-ast14-gcc4-glibc-pentium4.so codec_g729.so
Next, to ensure that your codec took, and is now working fully with Asterisk, restart Asterisk then login to if it is show up:
service asterisk restart asterisk -vr core show translation
The above command will vary from each version of Asterisk. The above works for 1.10 and 1.11
You should see something akin to this:
No comments:
Post a Comment