Page 76 - Asterisk™: The Future of Telephony
P. 76

Compiling Asterisk

               Once you’ve compiled and installed the zaptel and libpri packages (if you need them),
               you can move on to Asterisk. This section walks you through a standard installation
               and introduces some of the alternative make arguments that you may find useful.

               Standard Installation

               Asterisk is compiled with gcc through the use of the GNU make program. To get started
               compiling Asterisk, simply run the following commands (replace version with your
               version of Asterisk):
                   # cd /usr/src/asterisk-version

                   # make clean
                   # ./configure
                   # make menuselect
                   # make install
                   # make samples
               Be aware that compile times will vary between systems. On a current-generation pro-
               cessor,  you  shouldn’t  need  to  wait  more  than  five  minutes.  At  AstriCon  (http://
               www.astricon.net), someone reported successfully compiling Asterisk on a 133 MHz
               Pentium, but it took approximately five hours. You do the math.
               Run the make samples command to install the default configuration files. Installing these
               files (instead of configuring each file manually) will allow you to get your Asterisk
               system up and running much faster. Many of the default values are fine for Asterisk.
               Files that require editing will be explained in future chapters.


                           If you already have configuration files installed in /etc/asterisk/ when you
                           run the make samples command, .old will be appended to the end of each
                           of your current configuration files, for example, extensions.conf will be
                           renamed extensions.conf.old. Be careful, though, because if you run make
                           samples more than once you will overwrite your original configuration
                           files!
                           The sample configuration files can also be found in the configs/ subdir-
                           ectory within your Asterisk sources directory.

               If you’re using a system that makes use of the /etc/rc.d/init.d/ or /etc/init.d/ directories,
               you may wish to run the make config command as well. This will install the startup
               scripts and configure the system (through the use of the chkconfig command) to execute
               Asterisk automatically at startup:
                   # make config





               48 | Chapter 3: Installing Asterisk
   71   72   73   74   75   76   77   78   79   80   81