Chapter 3. Installing Asterisk

Table of Contents

What Packages Do I Need?
Linux Package Requirements
Obtaining the Source Code
Obtaining Asterisk Source Code
Extracting the Source Code
Menuselect
Compiling Zaptel
The ztdummy Driver
The Zapata Telephony Drivers
Using ztcfg and zttool
Compiling libpri
Compiling Asterisk
Standard Installation
Alternative make Arguments
make clean
make distclean
make update
make webvmail
make progdocs
make config
Using Precompiled Binaries
Installing Additional Prompts
Common Compiling Issues
Asterisk
configure: error: no acceptable C compiler found in $PATH
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
configure: error: *** termcap support not found
Zaptel
make: cc: Command not found
FATAL: Module wctdm/fxs/fxo not found
Unresolved symbol link when loading ztdummy
Depmod errors during compilation
Loading Asterisk and Zaptel Quickly
Loading Zaptel Modules Without Scripts
Systems Running udevd
Loading Zaptel
Loading ztdummy
Loading libpri Without Script
Starting Asterisk Without Scripts
Console Commands
Directories Used by Asterisk
/etc/asterisk/
/usr/lib/asterisk/modules/
/var/lib/asterisk
/var/spool/asterisk/
/var/run/
/var/log/asterisk/
/var/log/asterisk/cdr-csv
AsteriskNOW
What Is AsteriskNOW?
Before You Begin
What You Will Need
Installation
Quick installation
Extended procedure
Accessing the GUI
Alternate Installations
For More Information
Conclusion

I long to accomplish great and noble tasks, but it is my chief duty to accomplish humble tasks as though they were great and noble. The world is moved along, not only by the mighty shoves of its heroes, but also by the aggregate of the tiny pushes of each honest worker.

--Helen Keller

In the previous chapter, we discussed preparing a system to install Asterisk. Now it’s time to get our hands dirty!

Although a large number of Linux[42] distributions and PC architectures are excellent candidates for Asterisk, we have chosen to focus on a single distribution in order to maintain brevity and clarity throughout the book. The instructions that follow have been made as generic as possible, but you will notice a leaning toward CentOS directory structure and system utilities. We have chosen to focus on CentOS (arguably, the most popular distro for Asterisk) because its command set, directory structure, and so forth are likely to be familiar to a larger percentage of readers (we have found that many Linux administrators are familiar with CentOS, even if they don’t prefer it). This doesn’t mean that CentOS is the only choice, or even the best one for you. A question that often appears on the mailing lists is: “Which distribution of Linux is the best to use with Asterisk?” The multitude of answers generally boils down to “the one you like the best.”[43]



[42] And some non-Linux operating systems as well, such as Solaris, *BSD, and OS X. You should note that while people have managed to successfully run Asterisk on these alternative systems, Asterisk was, and continues to be, actively developed for Linux.

[43] We will be using CentOS Server 4.4 in this book, which we usually install with nothing except the Editors package selected. If you are not sure what distribution to choose, CentOS is an excellent choice. CentOS can be obtained from http://www.centos.org.