karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Karaf > 3. Installation
Date Tue, 13 Jul 2010 09:40:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/3/_/styles/combined.css?spaceKey=KARAF&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://cwiki.apache.org/confluence/display/KARAF/3.+Installation">3.
Installation</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~gnodet">Guillaume
Nodet</a>
    </h4>
        <br/>
                         <h4>Changes (26)</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" >h1. 3. Installation <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >This document describes how to
install and configure Apache <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Felix</span>
Karaf for both Unix and Windows&#39; platforms. <br></td></tr>
            <tr><td class="diff-unchanged" >Here you will find information about
what are pre requisite software, where to download Karaf from and how to customize the installation
to use custom ports other than the defaults. <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>*Hardware:* <br></td></tr>
            <tr><td class="diff-changed-lines" >* 5 MB of free disk space for
the Apache <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Felix</span>
Karaf x.y binary distribution. <br></td></tr>
            <tr><td class="diff-changed-lines" >* 3 MB of free disk space for
the Apache <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Felix</span>
Karaf x.y source distributions or SVN checkout. The Maven build requires roughly 57 MB disk
space and for the dependencies Maven downloads during building further 76 MB are required.
As a lot of small files are produced, the exact space demands depend greatly on your cluster
utilization ratio. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>*Operating Systems:* <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >* Java Developer Kit (JDK) 1.5.x or
greater ([http://java.sun.com/]). <br>* The JAVA_HOME environment variable must be set
to the directory where the JDK is installed, e.g., {{c:\Program Files\jdk.1.5.0_06}}. To accomplish
that, press Windows key and Break key together, switch to &quot;Advanced&quot; tab
and click on &quot;Environment Variables&quot;. Here, check for the variable and,
if necessary, add it. <br></td></tr>
            <tr><td class="diff-changed-lines" >* Apache Maven <span class="diff-changed-words">2.0.<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">8</span><span
class="diff-added-chars"style="background-color: #dfd;">9</span></span> ([http://maven.apache.org/download.html]).
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>h2. Installation Procedure
for Windows <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>This procedure explains
how to download and install the binary distribution on a Windows system. <br></td></tr>
            <tr><td class="diff-changed-lines" ># From a browser, navigate to
<span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">[http://felix.apache.org/site/downloads.cgi].</span>
<span class="diff-added-words"style="background-color: #dfd;">[http://karaf.apache.org/download.html].</span>
<br></td></tr>
            <tr><td class="diff-unchanged" ># Scroll down to the &quot;Apache
Felix Karaf&quot; section and select the desired distribution. <br></td></tr>
            <tr><td class="diff-changed-lines" >For a binary distribution, the
filename will be similar to: <span class="diff-changed-words">{{apache-<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y.zip}}.</span>
<br></td></tr>
            <tr><td class="diff-unchanged" ># Extract the files from the ZIP file
into a directory of your choice. Please remember the restrictions concerning illegal characters
in Java paths, e.g. \!, % etc. <br># Proceed to the [#Starting Karaf] section of this
document. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >This procedure explains how to download
and install the source distribution on a Windows system. *NOTE:* Karaf requires Java 5 is
compile, build and run. <br># From a browser, navigate to [http://felix.apache.org/site/downloads.cgi].
<br></td></tr>
            <tr><td class="diff-changed-lines" ># Scroll down to the &quot;Apache
<span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Felix</span>
Karaf&quot; section and select the desired distribution. <br></td></tr>
            <tr><td class="diff-changed-lines" >For a source distribution, the
filename will be similar to: <span class="diff-changed-words">{{apache-<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y-src.zip}}.</span>
<br></td></tr>
            <tr><td class="diff-unchanged" ># Extract Karaf from the ZIP file
into a directory of your choice. Please remember the restrictions concerning illegal characters
in Java paths, e.g. \!, % etc. <br></td></tr>
            <tr><td class="diff-changed-lines" ># {anchor:Windows Source Installation}
Build Karaf using Maven <span class="diff-changed-words">2.0.<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">8</span><span
class="diff-added-chars"style="background-color: #dfd;">9</span></span> or
greater and Java 5. <br></td></tr>
            <tr><td class="diff-unchanged" >The recommended method of building
Karaf is the following: <br>{code} <br>cd [karaf_install_dir]\\src <br>{code}
<br></td></tr>
            <tr><td class="diff-changed-lines" >where <span class="diff-changed-words">{{\[<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">FELIX:</span>karaf_install_dir\]}}</span>
is the directory in which Karaf was installed. <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>mvn <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" ># Unzip the distribution using your
favorite zip tool. The windows distribution is available at <br>{code} <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">[karaf_install_dir]\assembly\target\apache-felix-karaf-x.y.zip
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">\[karaf_install_dir\]\assembly\target\apache-felix-karaf-x.y.zip
<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br># Proceed to the
[#Starting Karaf] section of this document. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>This procedure explains
how to download and install the binary distribution on a Unix system. <br></td></tr>
            <tr><td class="diff-changed-lines" ># From a browser, navigate to
<span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">[http://felix.apache.org/site/downloads.cgi].</span>
<span class="diff-added-words"style="background-color: #dfd;">[http://karaf.apache.org/download.html].</span>
<br></td></tr>
            <tr><td class="diff-unchanged" ># Scroll down to the &quot;Apache
Felix Karaf&quot; section and select the desired distribution. <br>For a binary
Unix distribution, the filename will be similar to: apache-felix-karaf-x.y.tar.gz. <br>#
Extract the files from the gzip file into a directory of your choice. For example: <br>{code}
<br></td></tr>
            <tr><td class="diff-changed-lines" >gunzip <span class="diff-changed-words">apache-<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y.tar.gz</span>
<br></td></tr>
            <tr><td class="diff-changed-lines" >tar xvf <span class="diff-changed-words">apache-<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y.tar</span>
<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>Please remember the
restrictions concerning illegal characters in Java paths, e.g. \!, % etc. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >This procedure explains how to download
and install the source distribution on a Unix system. This procedure assumes the Unix machine
has a browser. Please see the previous [#Unix Binary Installation] section for ideas on how
to install Karaf without a browser. *NOTE:* Karaf requires Java 5 to compile, build and run.
<br># From a browser, navigate to [http://felix.apache.org/site/downloads.cgi]. <br></td></tr>
            <tr><td class="diff-changed-lines" ># Scroll down to the &quot;Apache
<span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Felix</span>
Karaf&quot; section and select the desired distribution. <br></td></tr>
            <tr><td class="diff-changed-lines" >For a source distribution, the
filename will be similar to: <span class="diff-changed-words">{{apache-<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y-src.tar.gz}}.</span>
<br></td></tr>
            <tr><td class="diff-unchanged" ># Extract the files from the ZIP file
into a directory of your choice. For example: <br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" >gunzip <span class="diff-changed-words">apache-<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y-src.tar.gz</span>
<br></td></tr>
            <tr><td class="diff-changed-lines" >tar xvf <span class="diff-changed-words">apache-<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y-src.tar</span>
<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>Please remember the
restrictions concerning illegal characters in Java paths, e.g. \!, % etc. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>cd [karaf_install_dir]/assembly/target
<br></td></tr>
            <tr><td class="diff-changed-lines" >gunzip <span class="diff-changed-words">apache-<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y.tar.gz</span>
<br></td></tr>
            <tr><td class="diff-changed-lines" >tar xvf <span class="diff-changed-words">apache-<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y.tar</span>
<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br># Proceed to the
[#Starting Karaf] section of this document. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >and for the source distribution go
to the target directory, for example: <br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" >cd <span class="diff-changed-words">[karaf_install_dir]\src\assembly\target\apache-<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y-SNAPSHOT</span>
<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br></td></tr>
            <tr><td class="diff-changed-lines" >where {{karaf_install_dir}} is
the directory in which Karaf was installed, e.g., {{c:\Program <span class="diff-changed-words">Files\apache-<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y}}.</span>
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>Then type: <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >and for the source distribution go
to the target directory, for example: <br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" >cd <span class="diff-changed-words">[karaf_install_dir]/src/assembly/target/apache-<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y</span>
<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br></td></tr>
            <tr><td class="diff-changed-lines" >where {{karaf_install_dir}} is
the directory in which Karaf was installed, e.g., <span class="diff-changed-words">{{/usr/local/apache-<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">felix-</span>karaf-x.y}}.</span>
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>Then type: <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >h2. Stopping Karaf <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >For both Windows and Unix installations,
you can perform a clean shutdown of Karaf <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Kernel</span>
by using the following command: <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>osgi:shutdown <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
        </table>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/KARAF/2.+Quick+Start"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/KARAF/2.+Quick+Start">2.
Quick Start</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/KARAF/Karaf+Users%27+Guide"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/KARAF/Karaf+Users%27+Guide">Karaf Users' Guide</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/KARAF/4.+Understanding+Karaf">4.
Understanding Karaf</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/KARAF/4.+Understanding+Karaf"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>
<p><a name="3.Installation-top"></a></p>

<h1><a name="3.Installation-3.Installation"></a>3. Installation</h1>

<p>This document describes how to install and configure Apache Karaf for both Unix and
Windows' platforms.<br/>
Here you will find information about what are pre requisite software, where to download Karaf
from and how to customize the installation to use custom ports other than the defaults.</p>

<p>This article contains the following sections:</p>
<div>
<ul>
    <li><a href='#3.Installation-PreInstallationRequirements'>Pre-Installation
Requirements</a></li>
    <li><a href='#3.Installation-InstallationProcedureforWindows'>Installation
Procedure for Windows</a></li>
<ul>
    <li><a href='#3.Installation-WindowsBinaryInstallation'>Windows Binary Installation</a></li>
    <li><a href='#3.Installation-WindowsSourceInstallation'>Windows Source Installation</a></li>
</ul>
    <li><a href='#3.Installation-InstallationProcedureForUnix'>Installation Procedure
For Unix</a></li>
<ul>
    <li><a href='#3.Installation-UnixBinaryInstallation'>Unix Binary Installation</a></li>
    <li><a href='#3.Installation-UnixSourceInstallation'>Unix Source Installation</a></li>
</ul>
    <li><a href='#3.Installation-StartingKaraf'>Starting Karaf</a></li>
<ul>
    <li><a href='#3.Installation-OnWindows'>On Windows</a></li>
    <li><a href='#3.Installation-OnUnix'>On Unix</a></li>
</ul>
    <li><a href='#3.Installation-TestingtheInstallation'>Testing the Installation</a></li>
    <li><a href='#3.Installation-StoppingKaraf'>Stopping Karaf</a></li>
</ul></div>

<h2><a name="3.Installation-PreInstallationRequirements"></a>Pre-Installation
Requirements</h2>

<p><b>Hardware:</b></p>
<ul>
	<li>5 MB of free disk space for the Apache Karaf x.y binary distribution.</li>
	<li>3 MB of free disk space for the Apache Karaf x.y source distributions or SVN checkout.
The Maven build requires roughly 57 MB disk space and for the dependencies Maven downloads
during building further 76 MB are required. As a lot of small files are produced, the exact
space demands depend greatly on your cluster utilization ratio.</li>
</ul>


<p><b>Operating Systems:</b></p>
<ul>
	<li>Windows: Windows XP SP2, Windows 2000.</li>
	<li>Unix: Ubuntu Linux, Powerdog Linux, MacOS, AIX, HP-UX, Solaris, any Unix platform
that supports Java.</li>
</ul>


<p><b>Environment:</b></p>
<ul>
	<li>Java Developer Kit (JDK) 1.5.x or greater (<a href="http://java.sun.com/" class="external-link"
rel="nofollow">http://java.sun.com/</a>).</li>
	<li>The JAVA_HOME environment variable must be set to the directory where the JDK is
installed, e.g., <tt>c:\Program Files\jdk.1.5.0_06</tt>. To accomplish that, press
Windows key and Break key together, switch to "Advanced" tab and click on "Environment Variables".
Here, check for the variable and, if necessary, add it.</li>
	<li>Apache Maven 2.0.9 (<a href="http://maven.apache.org/download.html" class="external-link"
rel="nofollow">http://maven.apache.org/download.html</a>).</li>
</ul>


<h2><a name="3.Installation-InstallationProcedureforWindows"></a>Installation
Procedure for Windows</h2>

<p>This section of the Getting Started guide explains how to install binary and source
distributions of Karaf on a Windows system.</p>
<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/check.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td><b>Handy Hint</b><br
/>In case you have to install Karaf into a very deep path or a path containing illegal
characters for Java paths, e.g. &#33;, % etc., you may add a bat file to <em>start
&#45;&gt; startup</em> that executes
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>subst S: "C:\your very % problematic path!\KARAF"
</pre>
</div></div>
<p>so your Karaf root directory is S: &#8212; which works for sure and is short
to type.</p></td></tr></table></div>

<h3><a name="3.Installation-WindowsBinaryInstallation"></a>Windows Binary
Installation</h3>

<p>This procedure explains how to download and install the binary distribution on a
Windows system.</p>
<ol>
	<li>From a browser, navigate to <a href="http://karaf.apache.org/download.html"
class="external-link" rel="nofollow">http://karaf.apache.org/download.html</a>.</li>
	<li>Scroll down to the "Apache Felix Karaf" section and select the desired distribution.<br/>
For a binary distribution, the filename will be similar to: <tt>apache-karaf-x.y.zip</tt>.</li>
	<li>Extract the files from the ZIP file into a directory of your choice. Please remember
the restrictions concerning illegal characters in Java paths, e.g. &#33;, % etc.</li>
	<li>Proceed to the <a href="#3.Installation-StartingKaraf">Starting Karaf</a>
section of this document.</li>
	<li>Following start-up, go to the <a href="#3.Installation-TestingtheInstallation">Testing
the Installation</a> section of this document.</li>
	<li>Optional: see <a href="/confluence/display/KARAF/7.1.+Enabling+Colorized+Console+Output+On+Windows"
title="7.1. Enabling Colorized Console Output On Windows">7.1. Enabling Colorized Console
Output On Windows</a></li>
</ol>


<h3><a name="3.Installation-WindowsSourceInstallation"></a>Windows Source
Installation</h3>

<p>This procedure explains how to download and install the source distribution on a
Windows system. <b>NOTE:</b> Karaf requires Java 5 is compile, build and run.</p>
<ol>
	<li>From a browser, navigate to <a href="http://felix.apache.org/site/downloads.cgi"
class="external-link" rel="nofollow">http://felix.apache.org/site/downloads.cgi</a>.</li>
	<li>Scroll down to the "Apache Karaf" section and select the desired distribution.<br/>
For a source distribution, the filename will be similar to: <tt>apache-karaf-x.y-src.zip</tt>.</li>
	<li>Extract Karaf from the ZIP file into a directory of your choice. Please remember
the restrictions concerning illegal characters in Java paths, e.g. &#33;, % etc.</li>
	<li><a name="3.Installation-WindowsSourceInstallation"></a> Build Karaf
using Maven 2.0.9 or greater and Java 5.<br/>
The recommended method of building Karaf is the following:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
cd [karaf_install_dir]\\src
</pre>
</div></div>
<p> where <tt>[karaf_install_dir]</tt> is the directory in which Karaf was
installed.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn
</pre>
</div></div>
<p>Both steps take around 10 to 15 minutes.</p></li>
	<li>Unzip the distribution using your favorite zip tool. The windows distribution is
available at
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
\[karaf_install_dir\]\assembly\target\apache-felix-karaf-x.y.zip
</pre>
</div></div></li>
	<li>Proceed to the <a href="#3.Installation-StartingKaraf">Starting Karaf</a>
section of this document.</li>
	<li>Following start-up, go to the <a href="#3.Installation-TestingtheInstallation">Testing
the Installation</a> section of this document.</li>
	<li>Optional: see <a href="/confluence/display/KARAF/7.1.+Enabling+Colorized+Console+Output+On+Windows"
title="7.1. Enabling Colorized Console Output On Windows">7.1. Enabling Colorized Console
Output On Windows</a></li>
</ol>


<h2><a name="3.Installation-InstallationProcedureForUnix"></a>Installation
Procedure For Unix</h2>

<h3><a name="3.Installation-UnixBinaryInstallation"></a>Unix Binary Installation</h3>

<p>This procedure explains how to download and install the binary distribution on a
Unix system.</p>
<ol>
	<li>From a browser, navigate to <a href="http://karaf.apache.org/download.html"
class="external-link" rel="nofollow">http://karaf.apache.org/download.html</a>.</li>
	<li>Scroll down to the "Apache Felix Karaf" section and select the desired distribution.<br/>
For a binary Unix distribution, the filename will be similar to: apache-felix-karaf-x.y.tar.gz.</li>
	<li>Extract the files from the gzip file into a directory of your choice. For example:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
gunzip apache-karaf-x.y.tar.gz
tar xvf apache-karaf-x.y.tar
</pre>
</div></div>
<p>Please remember the restrictions concerning illegal characters in Java paths, e.g.
&#33;, % etc.</p></li>
	<li>Proceed to the <a href="#3.Installation-StartingKaraf">Starting Karaf</a>
section of this document.</li>
	<li>Following start-up, go to the <a href="#3.Installation-TestingtheInstallation">Testing
the Installation</a> section.</li>
</ol>


<h3><a name="3.Installation-UnixSourceInstallation"></a>Unix Source Installation</h3>

<p>This procedure explains how to download and install the source distribution on a
Unix system. This procedure assumes the Unix machine has a browser. Please see the previous
<a href="#3.Installation-UnixBinaryInstallation">Unix Binary Installation</a>
section for ideas on how to install Karaf without a browser. <b>NOTE:</b> Karaf
requires Java 5 to compile, build and run.</p>
<ol>
	<li>From a browser, navigate to <a href="http://felix.apache.org/site/downloads.cgi"
class="external-link" rel="nofollow">http://felix.apache.org/site/downloads.cgi</a>.</li>
	<li>Scroll down to the "Apache Karaf" section and select the desired distribution.<br/>
For a source distribution, the filename will be similar to: <tt>apache-karaf-x.y-src.tar.gz</tt>.</li>
	<li>Extract the files from the ZIP file into a directory of your choice. For example:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
gunzip apache-karaf-x.y-src.tar.gz
tar xvf apache-karaf-x.y-src.tar
</pre>
</div></div>
<p>Please remember the restrictions concerning illegal characters in Java paths, e.g.
&#33;, % etc.</p></li>
	<li>Build Karaf using Maven 2.0.8 or greater and Java 5:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
The preferred method of building Karaf is the following:
cd [karaf_install_dir]/src
 where [karaf_install_dir] is the directory in which Karaf was installed.
mvn
</pre>
</div></div></li>
	<li>Uncompress the distribution that has just been created
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
cd [karaf_install_dir]/assembly/target
gunzip apache-karaf-x.y.tar.gz
tar xvf apache-karaf-x.y.tar
</pre>
</div></div></li>
	<li>Proceed to the <a href="#3.Installation-StartingKaraf">Starting Karaf</a>
section of this document.</li>
	<li>Following start-up, go to the <a href="#3.Installation-TestingtheInstallation">Testing
the Installation</a> section.</li>
</ol>



<h2><a name="3.Installation-StartingKaraf"></a>Starting Karaf</h2>


<h3><a name="3.Installation-OnWindows"></a>On Windows</h3>

<p>From a console window, change to the installation directory and run <tt>Karaf</tt>.
For the binary distribution, go to</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
cd [karaf_install_dir]
</pre>
</div></div>
<p>and for the source distribution go to the target directory, for example:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
cd [karaf_install_dir]\src\assembly\target\apache-karaf-x.y-SNAPSHOT
</pre>
</div></div>
<p>where <tt>karaf_install_dir</tt> is the directory in which Karaf was
installed, e.g., <tt>c:\Program Files\apache-karaf-x.y</tt>.</p>

<p>Then type:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
bin\karaf.bat
</pre>
</div></div>
<p><em>Note:</em> Working directories get created relative to the current
directory. For the working directories to be created in the proper place, Karaf must be launched
from its home/installation directory.</p>

<h3><a name="3.Installation-OnUnix"></a>On Unix</h3>

<p>From a command shell, change to the installation directory and run <tt>Karaf</tt>.
For the binary distribution, go to</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
cd [karaf_install_dir]
</pre>
</div></div>
<p>and for the source distribution go to the target directory, for example:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
cd [karaf_install_dir]/src/assembly/target/apache-karaf-x.y
</pre>
</div></div>
<p>where <tt>karaf_install_dir</tt> is the directory in which Karaf was
installed, e.g., <tt>/usr/local/apache-karaf-x.y</tt>.</p>

<p>Then type:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
bin/karaf.sh
</pre>
</div></div>

<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/forbidden.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td><b>Warning</b><br
/>Do NOT close the console or shell in which Karaf was started, as that will terminate
Karaf (unless Karaf was started with nohup).</td></tr></table></div>

<h2><a name="3.Installation-TestingtheInstallation"></a>Testing the Installation</h2>

<p>If Karaf is up and running without problems, the Window's console window or the Unix
command shell will display something similar to the following log line:</p>
<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeContent
panelContent">
<pre class="code-java">
        __ __                  ____      
       / <span class="code-comment">//_/____ __________ _/ __/      
</span>      / ,&lt;  / __ `/ ___/ __ `/ /_        
     / /| |/ /_/ / /  / /_/ / __/        
    /_/ |_|\__,_/_/   \__,_/_/         

  Apache Felix Karaf (2.0.0)

Hit '&lt;tab&gt;' <span class="code-keyword">for</span> a list of available
commands
and '[cmd] --help' <span class="code-keyword">for</span> help on a specific command.

karaf@root&gt; 
</pre>
</div></div>

<h2><a name="3.Installation-StoppingKaraf"></a>Stopping Karaf</h2>

<p>For both Windows and Unix installations, you can perform a clean shutdown of Karaf
by using the following command:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
osgi:shutdown
</pre>
</div></div>

<p>If Karaf was started in the background on Unix, the process can be killed, with the
following:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
ps -ef | grep karaf
kill [PID]
 where [PID] is the process id of the Karaf process.
</pre>
</div></div>

<p><a href="#3.Installation-top">top</a></p>
<style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/KARAF/2.+Quick+Start"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/KARAF/2.+Quick+Start">2.
Quick Start</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/KARAF/Karaf+Users%27+Guide"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/KARAF/Karaf+Users%27+Guide">Karaf Users' Guide</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/KARAF/4.+Understanding+Karaf">4.
Understanding Karaf</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/KARAF/4.+Understanding+Karaf"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/KARAF/3.+Installation">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=74690&revisedVersion=22&originalVersion=21">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/KARAF/3.+Installation?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message