Most Asterisk configurations are composed of three main packages : the main Asterisk program (asterisk), the Zapata telephony drivers (zaptel), and the PRI libraries (libpri). If you plan on a pure VoIP network, the only real requirement is the asterisk package, but we recommend installing all three packages.
Step-by-step install Asterisk system:
Step 1: Obtaining Asterisk Source Files
The commands we issue to download version to /usr/src:
# tar -zxvf zaptel-1.4.12.tar.gz # tar -zxvf libpri-1.12.tar.gz # tar -zxvf asterisk-22.214.171.124.tar.gz # tar –xzvf asterisk-addons-126.96.36.199.tar.gz # tar –xzvf asterisk-sounds-1.2.1.tar.gz
Step 3: Install Zaptel
The Zaptel sources are contained in /usr/src/zaptel. Type the following to install: # cd /usr/src/zaptel-version # make clean; make install
Zaptel, containing the Zapata drivers created for Asterisk, is necessary to use Digium's telephony hardware, but also includes a number of libraries that Asterisk depends on, whether we use Digium's hardware or not.
If we want to have Asterisk start up at boot time, we should issue the command: # make config
Step 4 : Install libpri
Next, we will compile and install the sources contained in /usr/src/libpri. We do this by typing: #cd /usr/src/asterisk/libpri-VERSION #make clean #make #make install
Libpri provides the libraries required for using Primary Rate ISDN (PRI) trunks, as well as a number of other telephony interfaces. Even if we do not have a PRI line at this time, it is a good idea to install it, as it will not create any conflicts.
Step 5 : Install Asterisk
Download the pre-requisite of asterisk:. Install them by command
#yum install name of library ( # yum install gcc)
Now, it is time to actually install Asterisk, contained in /usr/src/asterisk, like so:
# cd /usr/src/asterisk-version # make clean # ./configure # make install At this point, it is probably wise to install some sample configuration files so that we can acclimatize ourselves to Asterisk's structure. This is done by running: # make samples
Check Start Asterisk!
#asterisk -vvvvc #stop now
If not, you've probably not been following these instructions carefully! Assuming it does start properly, you probably want to start it in the background: