Page 69 - Asterisk™: The Future of Telephony
P. 69
Note that we will be making use of the /usr/src/ directory to extract and compile the
Asterisk source, although some system administrators may prefer to use /usr/local/src.
Also be aware that you will need root access to write files to the /usr/src/ directory and
to install Asterisk and its associated packages.
See Chapter 13 for information on running Asterisk as non-root. All
security professionals will recommend that you run your daemons as a
non-root user in case there are security vulnerabilities in the software.
This helps to lower (but obviously does not eliminate) the risk of some-
one compromising the root user.
To obtain the latest release source code via wget, enter the following commands on the
command line:
# cd /usr/src/
# wget http://downloads.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz
# wget http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
# wget http://downloads.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz
The latest versions of the asterisk, libpri, and zaptel packages may not
necessarily be the same version number.
Alternatively, during development and testing you will probably want to work with the
latest branch. To check it out from SVN, run:
# svn co http://svn.digium.com/svn/asterisk/branches/1.4 asterisk-1.4
If you retrieved the described source code via the release files on the Digium FTP server,
then extract the files as described in the next section before continuing on with
compiling.
Extracting the Source Code
The packages you downloaded from the FTP server are compressed archives containing
the source code; thus, you will need to extract them before compiling. If you didn’t
download the packages to /usr/src/, either move them there now or specify the full path
to their location. We will be using the GNU tar application to extract the source code
from the compressed archive. This is a simple process that can be achieved through the
use of the following commands:
# cd /usr/src/
# tar zxvf zaptel-1.4-current.tar.gz
# tar zxvf libpri-1.4-current.tar.gz
# tar zxvf asterisk-1.4-current.tar.gz
Obtaining the Source Code | 41