Now we can compile and install Asterisk. To compile Asterisk, simply type make at the Linux command line.

[root@server asterisk-1.8.X.Y]# make

The compiling step will take several minutes, and you'll see the various file names scroll by as they are being compiled. Once Asterisk has finished compiling, you'll see a message that looks like:

+--------- Asterisk Build Complete ---------+
+ Asterisk has successfully been built, and +
+ can be installed by running:              +
+                                           +
+                make install               +
+-------------------------------------------+
+--------- Asterisk Build Complete ---------+

As the message above suggests, our next step is to install the compiled Asterisk program and modules. To do this, use the make install command.

[root@server asterisk-1.8.X.Y]# make install

When finished, Asterisk will display the following warning:

+---- Asterisk Installation Complete -------+
+                                           +
+    YOU MUST READ THE SECURITY DOCUMENT    +
+                                           +
+ Asterisk has successfully been installed. +
+ If you would like to install the sample   +
+ configuration files (overwriting any      +
+ existing config files), run:              +
+                                           +
+                make samples               +
+                                           +
+-------------------------------------------+
+---- Asterisk Installation Complete -------+
Icon

Security Precautions
As the message above suggests, we very strongly recommend that you read the security documentation before continuing with your Asterisk installation. Failure to read and follow the security documentation can leave your system vulnerable to a number of security issues, including toll fraud.

If you installed Asterisk from a tarball (as shown above), the security information is located in a PDF file named asterisk.pdfin the tex/ sub-directory of the source code. If that file doesn't exist, please install the rubber application on your system, and then type:

[root@server asterisk-1.8.X.Y]# make pdf

Comments:

Custom Destination Directory

Icon

If for some reason you would like to have the binaries installed on a given directory, and the directory tree created starting from there you can use this:

$ make install DESTDIR=/path/to/your/directory
$ make samples DESTDIR=/another/custom/directory
Posted by khratos at May 16, 2011 14:41

Jose's DESTDIR approach is good for installing to a jail, temporary location for building .deb or .rpm, etc.

If you wish to install Asterisk to a location other than /usr and run it from there, it's best to pass the --prefix option to ./configure.

$ ./configure --prefix=/opt/Asterisk
Posted by dlee at Feb 12, 2013 09:52