<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/2033/1/7/_/styles/combined.css?spaceKey=TOP&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/TOP/Building+-+Linux">Building - Linux</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~kpfleming">Kevin P. Fleming</a>
</h4>
<br/>
<h4>Changes (2)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >#* Debian 5.0 <br>We'll need the cmake package from the testing repo, however, we'll not want to use the testing repo for much else so we'll need to create an apt preferences file that gives the main repo a higher priority. <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words">{<span class="diff-added-chars"style="background-color: #dfd;">expa</span>n<span class="diff-added-chars"style="background-color: #dfd;">d}{n</span>oformat}</span> <br></td></tr>
<tr><td class="diff-unchanged" >echo "deb http://www.backports.org/debian lenny-backports main contrib non-free" >> /etc/apt/sources.list <br>echo "deb http://ftp.us.debian.org/debian/ testing main" >> /etc/apt/sources.list <br>echo -e "Package: *\r\nPin: release a=stable\r\nPin-Priority: 900" >> /etc/apt/preferences <br>apt-get update <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words">{<span class="diff-added-chars"style="background-color: #dfd;">expa</span>n<span class="diff-added-chars"style="background-color: #dfd;">d}{n</span>oformat}</span> <br></td></tr>
<tr><td class="diff-unchanged" >#* CentOS / RHEL 5.5 <br>{noformat} <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<h2><a name="Building-Linux-Preface"></a>Preface</h2>
<p>These instructions explain how to build Asterisk SCF on a clean, basic Linux operating system installation.</p>
<h2><a name="Building-Linux-OperatingSystems"></a>Operating Systems</h2>
<p>Asterisk SCF is supported on a wide range of platforms and architectures. This documentation covers installing Asterisk SCF using the following operating systems.</p>
<ul>
        <li>CentOS / Red Hat Enterprise Linux (RHEL) 5.5</li>
        <li>Fedora 14</li>
        <li>Debian 5.0</li>
        <li>Ubuntu 10.04</li>
        <li>openSUSE 11.3</li>
</ul>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Oracle/Sun Java is required for Java support in Ice and is not available for all platforms and architectures (OpenJDK is not supported).<br/>
Additional details can be found on the Oracle website at <a href="http://www.oracle.com/technetwork/java/javase/system-configurations-135212.html" class="external-link" rel="nofollow">http://www.oracle.com/technetwork/java/javase/system-configurations-135212.html</a></td></tr></table></div>
<h2><a name="Building-Linux-Installation"></a>Installation</h2>
<ol>
        <li><h6><a name="Building-Linux-Addadditionalrequiredrepositories"></a>Add additional required repositories</h6>
        <ul>
                <li>Debian 5.0<br/>
We'll need the cmake package from the testing repo, however, we'll not want to use the testing repo for much else so we'll need to create an apt preferences file that gives the main repo a higher priority.<br/>
<style type="text/css">
@media all {
.expand-content { margin-left: 20px; }
.expand-control-icon { display: inline-block; width: 20px; }
.expand-control-text { vertical-align: top; text-decoration:none; }
.expand-control-image { vertical-align: middle; text-decoration:none; }
}
@media screen {
.expand-hidden { display: none; }
.expand-control { cursor: pointer; text-decoration: none; }
}
@media print {
/* show expander text in print */
.expand-content { display: block !important; }
}
</style>
<div id="expander-686486628" class="expand-control" tabindex="0"><span class="expand-control-icon"><img class="expand-control-image" src="/wiki/images/icons/arrow_down.png"></span><span class="expand-control-text">Click here to expand...</span></div>
<div class="expand-content"><div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre></pre>
</div></div>
<p>echo "deb <a href="http://www.backports.org/debian" class="external-link" rel="nofollow">http://www.backports.org/debian</a> lenny-backports main contrib non-free" >> /etc/apt/sources.list<br/>
echo "deb <a href="http://ftp.us.debian.org/debian/" class="external-link" rel="nofollow">http://ftp.us.debian.org/debian/</a> testing main" >> /etc/apt/sources.list<br/>
echo -e "Package: *\r\nPin: release a=stable\r\nPin-Priority: 900" >> /etc/apt/preferences<br/>
apt-get update</p></div>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#* CentOS / RHEL 5.5
</pre>
</div></div>
<p>rpm -Uvh <a href="http://download.fedora.redhat.com/pub/epel/5/" class="external-link" rel="nofollow">http://download.fedora.redhat.com/pub/epel/5/</a>`uname -i`/epel-release-5-4.noarch.rpm<br/>
rpm -Uvh <a href="http://blackopsoft.com/el5/RPMS/noarch/blackop-el5-repo-1.0-2.noarch.rpm" class="external-link" rel="nofollow">http://blackopsoft.com/el5/RPMS/noarch/blackop-el5-repo-1.0-2.noarch.rpm</a><br/>
rpm -Uvh <a href="http://rpmforge.sw.be/redhat/el5/en/" class="external-link" rel="nofollow">http://rpmforge.sw.be/redhat/el5/en/</a>`uname -i`/rpmforge/RPMS/rpmforge-release-0.5.1-1.el5.rf.`uname -i`.rpm<br/>
wget -O /etc/yum.repos.d/zeroc-ice.repo <a href="http://www.zeroc.com/download/Ice/3.4/rhel5/zeroc-ice.repo" class="external-link" rel="nofollow">http://www.zeroc.com/download/Ice/3.4/rhel5/zeroc-ice.repo</a> <br/>
wget -O /etc/yum.repos.d/jpackage50.repo <a href="http://www.jpackage.org/jpackage50.repo" class="external-link" rel="nofollow">http://www.jpackage.org/jpackage50.repo</a></p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#* Ubuntu 10.04
</pre>
</div></div>
<p>apt-get install python-software-properties<br/>
add-apt-repository "deb <a href="http://archive.canonical.com/" class="external-link" rel="nofollow">http://archive.canonical.com/</a> lucid partner"<br/>
apt-get update</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre># h6.Install required libraries and applications
#* Debian 5.0
</pre>
</div></div>
<p>apt-get install build-essential python python-dev<br/>
apt-get install -t testing cmake liblua5.1-0-dev libbz2-dev libssl-dev libexpat1-dev mono-gmcs monodevelop mono-xbuild<br/>
apt-get install libdb4.8++-dev ruby ruby1.8-dev php5-dev libmcpp-dev<br/>
apt-get install -t lenny-backports libboost1.40-all-dev git</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#* CentOS / RHEL 5.5
</pre>
</div></div>
<p>yum groupinstall "Development Tools"<br/>
yum install --enablerepo=blackop tcl cmake boost-devel-1.40.0-10.x86_64 lua-devel db4-devel jpackage-utils <br/>
yum install openssl-devel expat-devel bzip2-devel ruby ruby-devel php-devel python python-devel mcpp-devel<br/>
yum install --enablerepo=rpmforge git-all<br/>
rpm -Uvh <a href="http://s3.amazonaws.com/mindtouch/mono-2.4.3-1.noarch.rpm" class="external-link" rel="nofollow">http://s3.amazonaws.com/mindtouch/mono-2.4.3-1.noarch.rpm</a></p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>You'll need to edit your PATH environment variable either in your '~/.bashrc' file or '/etc/profile' to include '/opt/mono-2.4.3/bin/'.
#* Ubuntu 10.04
</pre>
</div></div>
<p>apt-get install build-essential libboost1.40-all-dev liblua5.1-0-dev cmake libmcpp-dev libbz2-dev libdb4.8++-dev mono-gmcs monodevelop mono-xbuild ruby ruby1.8-dev php5-dev libexpat1-dev libssl-dev git-core</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#* Fedora 14
</pre>
</div></div>
<p>yum groupinstall "Development Tools"<br/>
yum-builddep ice<br/>
yum install jgoodies-forms jgoodies-looks boost-devel lua-devel git-all</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#* openSUSE 11.3
</pre>
</div></div>
<p>sudo zypper install devel_rpm_build gcc-c++ cmake git-core libopenssl-devel libbz2-devel python-devel libexpat-devel php5-devel lua-devel ruby ruby-devel patch libtool<br/>
mkdir zeroc<br/>
cd zeroc<br/>
wget <a href="http://www.zeroc.com/download/Ice/3.4/Ice-3.4.1-sles11-x86_64-rpm.tar.gz" class="external-link" rel="nofollow">http://www.zeroc.com/download/Ice/3.4/Ice-3.4.1-sles11-x86_64-rpm.tar.gz</a><br/>
tar -xvf Ice-3.4.1-sles11-x86_64-rpm.tar.gz<br/>
sudo rpm -i db48-4.8.30-1ice.sles11.x86_64.rpm<br/>
sudo rpm -i db48-devel-4.8.30-1ice.sles11.x86_64.rpm<br/>
sudo rpm -i db48-java-4.8.30-1ice.sles11.x86_64.rpm<br/>
sudo rpm -i db48-utils-4.8.30-1ice.sles11.x86_64.rpm<br/>
sudo rpm -i mcpp-devel-2.7.2-2ice.sles11.x86_64.rpm<br/>
cd ~<br/>
wget <a href="http://cdnetworks-us-2.dl.sourceforge.net/project/boost/boost/1.44.0/boost_1_44_0.tar.gz" class="external-link" rel="nofollow">http://cdnetworks-us-2.dl.sourceforge.net/project/boost/boost/1.44.0/boost_1_44_0.tar.gz</a><br/>
tar -xvf boost_1_44_0.tar.gz<br/>
cd boost_1_44_0<br/>
./bootstrap.sh<br/>
./bjam<br/>
sudo ./bjam install<br/>
cd ~</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre># h6.Java Support (optional)
#* Debian 5.0
Append "non-free" to the "lenny main" entries in /etc/apt/sources.list file so they look similar to the ones below.
</pre>
</div></div>
<p>deb <a href="http://ftp.us.debian.org/debian/" class="external-link" rel="nofollow">http://ftp.us.debian.org/debian/</a> lenny main non-free<br/>
deb-src <a href="http://ftp.us.debian.org/debian/" class="external-link" rel="nofollow">http://ftp.us.debian.org/debian/</a> lenny main non-free</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>Finish installing
</pre>
</div></div>
<p>apt-get update<br/>
apt-get install sun-java6-jdk libdb4.8-java ant libjgoodies-forms-java libjgoodies-looks-java<br/>
update-alternatives --config java</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#* CentOS / RHEL 5.5
</pre>
</div></div>
<p>mkdir -p ~/rpmbuild/</p>
<div class="error"><span class="error">Unknown macro: {SOURCES,SRPMS,SPECS,RPMS,tmp,BUILD}</span> </div>
<p>touch ~/.rpmmacros<br/>
echo "%_topdir /root/rpmbuild" >> ~/.rpmmacros<br/>
echo "%_tmppath %{_topdir}/tmp" >> ~/.rpmmacros<br/>
yum install -y rpm-build redhat-rpm-config libXp-devel</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>As there is no official CentOS / Redhat Java repository, you'll need to download the JDK (non-rpm bin format) from [here|https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u11-oth-JPR@CDS-CDS_Developer] and move it into the ~/rpmbuild/SOURCES/ directory. Care must be taken in making sure the jpackage source rpm sun version and the JDK version are identical.
</pre>
</div></div>
<p>cd ~/rpmbuild<br/>
wget <a href="http://mirrors.dotsrc.org/jpackage/1.7/generic/SRPMS.non-free/java-1.6.0-sun-1.6.0.11-1jpp.nosrc.rpm" class="external-link" rel="nofollow">http://mirrors.dotsrc.org/jpackage/1.7/generic/SRPMS.non-free/java-1.6.0-sun-1.6.0.11-1jpp.nosrc.rpm</a><br/>
rpmbuild --rebuild java-1.6.0-sun-1.6.0.11-1jpp.nosrc.rpm<br/>
rpm -Uvh ~/rpmbuild/RPMS/`uname -i`/java-1.6.0-sun-1.6.0.11-1jpp.`uname -i`.rpm<br/>
alternatives --config java<br/>
yum install --enablerepo=blackop db4-java<br/>
yum install --disablerepo=blackop ant ant-nodeps</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#* Ubuntu 10.04
</pre>
</div></div>
<p>add-apt-repository "deb <a href="http://archive.canonical.com/" class="external-link" rel="nofollow">http://archive.canonical.com/</a> lucid partner"<br/>
apt-get update<br/>
apt-get install sun-java6-jdk libdb4.8-java ant libjgoodies-forms-java libjgoodies-looks-java<br/>
update-alternatives --config java</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#* openSUSE 11.3
</pre>
</div></div>
<p>sudo zypper install java-1_6_0-sun ant ant-nodeps libdb_java-4_5-devel jpackage-utils </p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre># h6.Build / Install Ice
We need to clone Digium's branch of Ice
</pre>
</div></div>
<p>git clone git://git.asterisk.org/asterisk-scf/release/ice<br/>
cd ice</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#* With Java support
#** Set class path
#*** Debian 5.0 and Ubuntu 10.04
</pre>
</div></div>
<p>export CLASSPATH=/usr/share/java/libdb4.8-java.jar:/usr/share/java/forms.jar:/usr/share/java/looks.jar</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#*** CentOS / RHEL 5.5
</pre>
</div></div>
<p>wget <a href="http://www.jgoodies.com/download/libraries/forms/forms-1_3_0.zip" class="external-link" rel="nofollow">http://www.jgoodies.com/download/libraries/forms/forms-1_3_0.zip</a><br/>
unzip forms-1_3_0.zip<br/>
mv forms-1.3.0/forms-1.3.0.jar /usr/share/java/forms.jar<br/>
wget <a href="http://www.jgoodies.com/download/libraries/looks/looks-2_3_1.zip" class="external-link" rel="nofollow">http://www.jgoodies.com/download/libraries/looks/looks-2_3_1.zip</a><br/>
unzip looks-2_3_1.zip<br/>
mv looks-2.3.1/looks-2.3.1.jar /usr/share/java/looks.jar<br/>
export CLASSPATH=/usr/share/java/db.jar:/usr/share/java/forms.jar:/usr/share/java/looks.jar</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#*** Fedora 14
</pre>
</div></div>
<p>export CLASSPATH=/usr/share/java/db.jar:/usr/share/java/jgoodies-forms.jar:/usr/share/java/jgoodies-looks.jar</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#** Make
</pre>
</div></div>
<p>make install<br/>
cd ..</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>#* With C++ and Python support ONLY
</pre>
</div></div>
<p>cd cpp<br/>
make install<br/>
cd ../py<br/>
make install<br/>
cd ../..</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre># h6.Obtain the Asterisk SCF source
We need to clone the Asterisk SCF build environment
</pre>
</div></div>
<p>git clone git://git.asterisk.org/asterisk-scf/integration/gitall<br/>
cd gitall<br/>
./gitall-asterisk-scf.sh</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre># h6.Build Asterisk SCF
</pre>
</div></div>
<p>./cmake/init-cmake.sh<br/>
cmake --build ./build</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre></pre>
</div></div></li>
        </ul>
        </li>
</ol>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;">
<a href="https://wiki.asterisk.org/wiki/users/viewnotifications.action" class="grey">Change Notification Preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/TOP/Building+-+Linux">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=5243911&revisedVersion=46&originalVersion=45">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/TOP/Building+-+Linux?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>