Installing Asterisk PBX on any of the Linux/BSD distribution
We strongly recommend that you use RHEL or Fedora for installing Asterisk, cause it works way better and its easy to configure on these distros
Check for Pre-requsite for installing Asterisk on your machine
- In order to install Asterisk, first check whether the kernel-devel modules are installed on your machine. This can be checked by running the command at the prompt rpm -q kernel-devel
If these modules are not installed, install these modules by issuing the command: yum install kernel-devel - Now check whether the following modules are installed by running the command rpm -q (name of the module)
bison
bison-devel
ncurses
ncurses-devel
zlib
zlib-devel
openssl
openssl-devel
gnutls-devel
gcc
gcc-c++ - If these modules are not installed, then install them manually by using the command yum install(name of the module)
- If yum is not able to find one or more of these above mentioned files, you can find these files on http://rpm.pbone.net/. You can download the rpm and install them manually by using the command: rpm -Uvh package.rpm
- The only thing left is to create the kernel sources link in the /usr/src folder. This is important for installing Zaptel and Asterisk. Do not continue installation of Asterisk without doing this step.
A soft link named 'linux' which is linked to the kernel sources folder has to be created. This can be done using the following steps:
cd /usr/src
ln -s kernels/2.6.(latest update of the kernel sources done for your machine) linux
eg. ln -s kernels/2.6.9-128.0.3.EL-X86_64 linux
A soft link named linux will be created. By issuing a ls -l command in the terminal will show the linus file linking to the kernel source.
OUTPUT:
[root@localhost src]# ls -l
lrwxrwxrwx 1 root root 33 Mar 19 00:14 linux -> kernels/2.6.18-128.1.1.el5-x86_64
Once all the pre-requisites as mentioned above are taken care of, you are good to install asterisk on the machine.
- Download the following packages into the /usr/src folder from the site http://www.asterisk.org/downloads:
- Libpri
- DAHDI Linux
- DAHDI Tools
- Asterisk
- Addons for Asterisk
- Also download the MPG123 package from http://www.mpg123.de/download.shtml
- Extract these archives using the command : tar -zxvf package.tar.gz and then rename the folders name created after extracting the archives by the application names. eg rename folder named asterisk-1.4.9 to asterisk
- Install MPG123 using the following commands:
cd /usr/src/mpg123
./configure
make
make install - Install Libpri using the following commands:
cd /usr/src/libpri
make
make install - Install DAHGI Linux using the following commands:
cd /usr/src/dahdi-linux
make
make install - Install DAHGI Tools using the following commands:
cd /usr/src/dahdi-tools
./configure
make
make install - Install Astersik using the following commands:
cd /usr/src/asterisk
./configure
make
make install
make samples
Once this is done and you receive the prompt that "Asterisk has been successfully installed", test the asterisk installation by first starting the daemon.
- Enter 'safe_asterisk' command at the prompt.
- Now enter the command 'asterisk -vvvvvr' (i.e. 5 times v and then r)
You should enter the asterisk CLI interface on entering the above command. This shows that the asterisk is properly configured.Now reload the entire config by typing the 'reload' command