<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2176/25/9/_/styles/combined.css?spaceKey=AST&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+Asterisk?focusedCommentId=22088075#comment-22088075">Building and Installing Asterisk</a></h2>
        <h4>Page
        <b>comment added</b> by              <a href="https://wiki.asterisk.org/wiki/display/~dlee">David M. Lee</a>
    </h4>
    <br/>
    <div class="notificationGreySide">
       <p>Jose's <tt>DESTDIR</tt> approach is good for installing to a jail, temporary location for building <tt>.deb</tt> or <tt>.rpm</tt>, etc.</p>

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

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false">$ ./configure --prefix=/opt/Asterisk</pre>
</div></div>
    </div>

                <div style="border-bottom: 1px solid #ddd; padding: 10px 20px 7px 20px;">
        <strong>In reply to a comment by <a href="/wiki/display/~khratos"
                          class="url fn confluence-userlink" data-username="khratos"
                   >Jose P. Espinal</a>:</strong><br/>
        <div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Custom Destination Directory</b><br />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:
<br class="atl-forced-newline" />
<br class="atl-forced-newline" />
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[$ make install DESTDIR=/path/to/your/directory]]></script>
</div></div>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[$ make samples DESTDIR=/another/custom/directory]]></script>
</div></div></td></tr></table></div>
        </div>
    
    <div id="commentsSection" class="wiki-content pageSection">
      <div style="float: right;" class="grey">
                        <a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
       <a href="https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+Asterisk?focusedCommentId=22088075#comment-22088075">View Online</a>
              |
       <a id="reply-22088075" href="https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+Asterisk?replyToComment=22088075#comment-22088075">Reply To This</a>
           </div>

</div>
</div>
</div>
</div>
</body>
</html>