karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r1553356 [21/31] - in /karaf/site/production/manual/latest: ./ commands/ developers-guide/ users-guide/
Date Wed, 25 Dec 2013 06:31:55 GMT
Modified: karaf/site/production/manual/latest/manual.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/manual.html?rev=1553356&r1=1553355&r2=1553356&view=diff
==============================================================================
--- karaf/site/production/manual/latest/manual.html (original)
+++ karaf/site/production/manual/latest/manual.html Wed Dec 25 06:31:51 2013
@@ -784,15 +784,15 @@ div.compare div div {
 
   </style>
 
-  <title>Apache Karaf 3.0.0-SNAPSHOT Guides</title>
+  <title>Apache Karaf 3.0.1-SNAPSHOT Guides</title>
 </head>
 <body>
   <div id="titlepage">
     <div id="title">Apache Karaf</div>
-    <div id="subtitle">Version 3.0.0-SNAPSHOT</div>
+    <div id="subtitle">Version 3.0.1-SNAPSHOT</div>
   </div>
   <div id="main">
-    <div class="title"><p><img border="0" src="images/karaf-logos.png"/><br/><br/><br/><br/><br/><br/><br/><br/><br/>Apache Karaf<br/>Users' Guide<br/><br/><br/><br/><br/><br/><br/><br/></p></div><div class="copyright-section"><p>Copyright 2011 The Apache Software Foundation</p><p>The PDF format of the Karaf Manual has been generated by Prince XML (http://www.princexml.com).</p></div><div class="toc-title"><p>Table of contents</p></div><ol style="list-style: none;"><li><a href="#Overview.html">Overview</a></li><li><a href="#QuickStart.html">Quick Start</a></li><li><a href="#UsersGuide.html">Users Guide</a></li><li><a href="#DevelopersGuide.html">Developers Guide</a></li></ol><h1 id="Overview">Overview</h1><h1 id="KarafOverview">Karaf Overview</h1><p>Apache Karaf is a small OSGi based runtime which provides a lightweight container onto which various components and applications can be deployed.</p><ul><li>Uses either Apache Felix or Eclipse Equinox as OSGi framework and extends these 
 with many features that make it a fully featured server</li><li>Can be scaled from a very lightweight small container to a fully featured enterprise Server</li></ul><p><a href="users-guide/features.html">See all Karaf features in detail</a></p><p>Here is a short list of features supported by the Karaf:</p><ul><li><strong>Hot deployment</strong>: Karaf supports hot deployment of OSGi bundles by monitoring jar files inside the <tt>deploy</tt> directory.  Each time a jar is copied in this folder, it will be installed inside the runtime.  You can then update or delete it and changes will be handled automatically.  In addition, Karaf also supports exploded bundles and custom deployers (Blueprint and Spring ones are included by default).</li><li><strong>Dynamic configuration</strong>: Services are usually configured through the ConfigurationAdmin OSGi service.  Such configuration can be defined in Karaf using property files inside the <tt>etc</tt> directory.  These configurations are moni
 tored and changes on the properties files will be propagated to the services.</li><li><strong>Logging System</strong>: using a centralized logging back end supported by Log4J, Karaf supports a number of different APIs (JDK 1.4, JCL, SLF4J, Avalon, Tomcat, OSGi)</li><li><strong>Provisioning</strong>: Provisioning of libraries or applications can be done through a number of different ways, by which they will be downloaded locally, installed and started.</li><li><strong>Native OS integration</strong>: Karaf can be integrated into your own Operating System as a service so that the lifecycle will be bound to your Operating System.</li><li><strong>Extensible Shell console</strong>: Karaf features a nice text console where you can manage the services, install new applications or libraries and manage their state.  This shell is easily extensible by deploying new commands dynamically along with new features or applications.</li><li><strong>Remote access</strong>: use any SSH client to connec
 t to Karaf and issue commands in the console</li><li><strong>Security framework</strong> based on JAAS</li><li><strong>Managing instances</strong>: Karaf provides simple commands for managing multiple instances. You can easily create, delete, start and stop instances of Karaf through the console.</li><li>Supports the latest OSGi 4.3 containers: Apache Felix Framework 4.0 and Eclipse Equinox 3.8</li></ul><p><img border="0" src="images/karaf.png"/></p><h1 id="QuickStart">Quick Start</h1><h1 id="QuickStart">Quick Start</h1><p>This instructions should help you get Apache Karaf up and running in 5 to 15 minutes.</p><h2 id="Prerequisites">Prerequisites</h2><p>Karaf requires a Java SE 6 environment to run. Refer to <a href="http://www.oracle.com/technetwork/java/javase/">http://www.oracle.com/technetwork/java/javase/</a> for details on how to download and install Java SE 1.6 or greater.</p><ul><li>Open a Web browser and access the following URL: <a href="http://karaf.apache.org/index/commu
 nity/download.html">http://karaf.apache.org/index/community/download.html</a></li><li>Download the binary distribution that matches your system (zip for windows, tar.gz for unixes) </li><li>Extract the archive a new folder on your hard drive; for example in c:\karaf - from now on this directory will be referenced as &lt;KARAF_HOME>.</li></ul><h2 id="Starttheserver">Start the server</h2><p>Open a command line console and change the directory to &lt;KARAF_HOME>. </p><p>To start the server, run the following command in Windows:</p><pre>
+    <div class="title"><p><img border="0" src="images/karaf-logos.png"/><br/><br/><br/><br/><br/><br/><br/><br/><br/>Apache Karaf<br/>Users' Guide<br/><br/><br/><br/><br/><br/><br/><br/></p></div><div class="copyright-section"><p>Copyright 2011 The Apache Software Foundation</p><p>The PDF format of the Karaf Manual has been generated by Prince XML (http://www.princexml.com).</p></div><div class="toc-title"><p>Table of contents</p></div><ol style="list-style: none;"><li><a href="#Overview.html">Overview</a></li><li><a href="#QuickStart.html">Quick Start</a></li><li><a href="#UsersGuide.html">Users Guide</a></li><li><a href="#DevelopersGuide.html">Developers Guide</a></li></ol><h1 id="Overview">Overview</h1><h1 id="ApacheKarafOverview">Apache Karaf Overview</h1><p>Apache Karaf is a OSGi-based runtime which provides a lightweight container onto which various components and applications can be deployed.</p><p>Apache Karaf uses either Apache Felix Framework or Eclipse Equinox OSGi framew
 orks, and provide additional features on top of the framework.</p><p>Apache Karaf can be scaled from a very lightweight container to a fully features enterprise service: it's a very flexible and extensible container, covering all the major needs.</p><p>Here is a short list of provided features:</p><ul><li><strong>Hot deployment</strong>: simply drop a file in the <tt>deploy</tt> directory, Apache Karaf will detect the type of the file and<p> try to deploy it.</p></li><li><strong>Complete Console</strong>: Apache Karaf provides a complete Unix-like console where you can completely manage the container.</li><li><strong>Dynamic Configuration</strong>: Apache Karaf provides a set of command dedicated for the management of the configuration files.<p> All configuration files are centralized in the <tt>etc</tt> folder. Any change in a configuration file is taken on the fly.</p></li><li><strong>Advanced Logging System</strong>: Apache Karaf supports a large set of Logging framework (slf4j, 
 log4j, etc). Whatever the<p> logging framework you use, Apache Karaf centralizes the configuration in one file.</p></li><li><strong>Provisioning</strong>: Apache Karaf supports a large set of URL where you can install your application (Maven repository, HTTP,<p> file, etc). It also provides the concept of "Karaf Feature" which is a way to describe your application.</p></li><li><strong>Management</strong>: Apache Karaf is an enterprise-ready container, providing a lot of management indicators and operations<p> via JMX.</p></li><li><strong>Remote</strong>: Apache Karaf embeds an SSHd server allowing you to use the console remotely. The management layer is also<p> accessible remotely.</p></li><li><strong>Security</strong>: Apache Karaf provides a complete security framework (based on JAAS), and providing RBAC (Role-Based Access<p> Control) mechanism for console and JMX.</p></li><li><strong>Instances</strong>: multiple instances of Apache Karaf can be managed directly from a main instan
 ce (root).</li><li><strong>OSGi frameworks</strong>: Apache Karaf is not tight to one OSGi framework. By default, Apache Karaf runs with Apache Felix<p> Framework, but you can easily switch to Equinox (just change on property in a configuration file).</p><p><img border="0" src="images/karaf.png"/></p></li></ul><h1 id="QuickStart">Quick Start</h1><h1 id="QuickStart">Quick Start</h1><p>This instructions should help you get Apache Karaf up and running in 5 to 15 minutes.</p><h2 id="Prerequisites">Prerequisites</h2><p>Karaf requires a Java SE 7 environment to run. Refer to <a href="http://www.oracle.com/technetwork/java/javase/">http://www.oracle.com/technetwork/java/javase/</a> for details on how to download and install Java SE 1.7 or greater.</p><ul><li>Open a Web browser and access the following URL: <a href="http://karaf.apache.org/index/community/download.html">http://karaf.apache.org/index/community/download.html</a></li><li>Download the binary distribution that matches your syste
 m (zip for windows, tar.gz for unixes) </li><li>Extract the archive a new folder on your hard drive; for example in c:\karaf - from now on this directory will be referenced as &lt;KARAF_HOME>.</li></ul><h2 id="Starttheserver">Start the server</h2><p>Open a command line console and change the directory to &lt;KARAF_HOME>. </p><p>To start the server, run the following command in Windows:</p><pre>
 bin\karaf.bat
 </pre><p>respectively on Unix:</p><pre>
 bin/karaf
@@ -803,18 +803,21 @@ bin/karaf
      / /| |/ /_/ / /  / /_/ / __/
     /_/ |_|\__,_/_/   \__,_/_/
 
-  Apache Karaf (3.0.0-SNAPSHOT)
+  Apache Karaf (3.0.0)
 
 Hit '&lt;tab>' for a list of available commands
 and '[cmd] --help' for help on a specific command.
-Hit '&lt;ctrl-d>' or 'system:shutdown' to shutdown Karaf.
+Hit '&lt;ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
 
-karaf@root()> 
-</pre><h2 id="SomeshellBasics">Some shell Basics</h2><p>You can now run your first command.  Simply type the <tt>&lt;tab></tt> key in the console.</p><pre>
-karaf@root> 
+karaf@root()>
 
-instance:change-port      instance:connect          instance:create           instance:destroy
-instance:list             instance:start            instance:stop             config:cancel
+</pre><h2 id="SomeshellBasics">Some shell Basics</h2><p>You can now run your first command.  Simply type the <tt>&lt;tab></tt> key in the console.</p><pre>
+karaf@root> Display all 183 possibilities? (y or n)
+*:config                            *:dev                               *:feature                           *:instance                          *:jaas                              *:kar                               *:log                               *:package
+*:region                            *:service                           *:shell                             *:ssh                               addbundle                           addfilter                           addregion                           alias
+cancel                              cl                                  clear                               clone                               config                              config:cancel                       config:delete                       config:edit
+config:list                         config:property-append              config:property-delete              config:property-list                config:property-set                 config:update                       connect                             create
+date                                delete                              destroy                             dev                                 dev:dump-create                     display                             dump-create                         each
 ...
 </pre><p>You can then grab more specific help for a given command using the <tt>--help</tt> option for this command:</p><pre>
 karaf@root()> bundle:list --help
@@ -822,73 +825,281 @@ DESCRIPTION
         bundle:list
 
         Lists all installed bundles.
-...
+
+SYNTAX
+        bundle:list [options]
+
+OPTIONS
+        -u
+                Shows the update locations
+        --help
+                Display this help message
+        --table
+                Show bundles using a shell table
+        -t
+                Specifies the bundle threshold; bundles with a start-level less than this value will not get printed out.
+        -l
+                Show the locations
+        -s
+                Shows the symbolic name
+
 </pre><p>Note that the console supports tab completion so if your start typing a command it will show possible completions and also auto complete if there is only one completion.</p><h2 id="Deployasampleapplication">Deploy a sample application</h2><p>While you will learn in the Karaf user's guide how to fully use and leverage Apache Karaf, let's install a sample <a href="http://camel.apache.org">Apache Camel</a> application for now:</p><p>In the console, run the following commands:</p><pre>
-feature:repo-add camel 2.10.0
-feature:install camel-spring
-install -s mvn:org.apache.camel/camel-example-osgi/2.10.1
+karaf@root()> feature:repo-add camel 2.10.0
+Adding feature url mvn:org.apache.camel.karaf/apache-camel/2.10.0/xml/features
+karaf@root()> feature:install camel-spring
+karaf@root()> bundle:install -s mvn:org.apache.camel/camel-example-osgi/2.10.1
 </pre><p>The example installed is using Camel to start a timer every 2 seconds and output a message on the console.<br/>The previous commands download the Camel features descriptor and install the example feature.</p><pre>
 >>>> SpringDSL set body:  Fri Jan 07 11:59:51 CET 2011
 >>>> SpringDSL set body:  Fri Jan 07 11:59:53 CET 2011
 >>>> SpringDSL set body:  Fri Jan 07 11:59:55 CET 2011
 
 </pre><h3 id="Stoppinganduninstallingthesampleapplication">Stopping and uninstalling the sample application</h3><p>To stop this demo, run the following command:</p><pre>
-bundle:stop org.apache.camel.camel-example-osgi
+karaf@root()> bundle:stop org.apache.camel.camel-example-osgi
 </pre><h2 id="StoppingKaraf">Stopping Karaf</h2><p>To stop Karaf from the console, enter <tt>^D</tt> in the console:</p><pre>
 ^D
 </pre><p>Alternatively, you can also run the following command:</p><pre>
 system:shutdown
-</pre><h3 id="CleaningtheKarafstate">Cleaning the Karaf state</h3><p>Normally Karaf remembers the features and bundles you installed and started. The reset Karaf into a clean state just delete the data directory when karaf is not running.</p><h2 id="Summary">Summary</h2><p>This document showed how simple it is to have Apache Karaf up and running and install a simple Apache Camel application.</p><h1 id="UsersGuide">Users Guide</h1><h1 id="Installation">Installation</h1><p>This chapter describes how to install Apache Karaf for both Unix and Windows platforms, including<br/>prerequisite software and necessary download links.</p><h2 id="PreInstallationRequirements">Pre-Installation Requirements</h2><p><strong>Hardware:</strong></p><ul><li>20 MB of free disk space for the Apache Karaf binary distribution.</li></ul><p><strong>Operating Systems:</strong></p><ul><li>Windows: Windows Vista, 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><strong>Environment:</strong></p><ul><li>Java SE 1.6.x or greater (<a href="http://www.oracle.com/technetwork/java/javase/">http://www.oracle.com/technetwork/java/javase/</a>).</li><li>The JAVA_HOME environment variable must be set to the directory where the Java runtime is installed, e.g., <tt>c:\Program Files\jdk.1.6.0_24</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></ul><h2 id="InstallationProcedureforWindows">Installation Procedure for Windows</h2><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/index/community/download.html">http://karaf.apache.org/index/community/download.html</a>.</li><li>Scroll down to the "Apache Karaf" section and select the desired distributi
 on.<p>For a binary distribution, the filename will be similar to: <tt>apache-karaf-x.y.zip</tt>.</p></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. !, % etc.</li><li>Proceed to the <a href="start-stop#Starting Karaf.html">Starting Karaf</a> chapter.</li></ol><div class="tip" style="border: 1px solid #090;background-color: #dfd;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Handy Hint</b></p><p>In case you have to install Karaf into a very deep path or a path containing illegal characters for Java paths, e.g. !, % etc., you may add a bat file to <em>start \-> startup</em> that executes</p><pre>subst S: "C:\your very % problematic path!\KARAF"
-</pre><p>so your Karaf root directory is S: <del>-</del> which works for sure and is short to type.</p></div><h2 id="InstallationProcedureForUnix">Installation Procedure For Unix</h2><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">http://karaf.apache.org/download.html</a>.</li><li>Scroll down to the "Apache Karaf" section and select the desired distribution.<p>For a binary Unix distribution, the filename will be similar to: apache-karaf-x.y.tar.gz.</p></li><li>Extract the files from the gzip file into a directory of your choice. For example:<pre>
-gunzip apache-karaf-x.y.tar.gz
-tar xvf apache-karaf-x.y.tar
-</pre><p>Please remember the restrictions concerning illegal characters in Java paths, e.g. !, % etc.</p></li><li>Proceed to the <a href="start-stop#Starting Karaf.html">Starting Karaf</a> chapter.</li></ol><h2 id="PostInstallationsteps">Post-Installation steps</h2><p>Thought it is not always required, it is strongly advised to set up the <tt>JAVA_HOME</tt> environment property to point to the JDK you want Karaf to use before starting it.<br/>This property is used to locate the <tt>java</tt> executable and should be configured to point to the home directory of the Java SE 6 installation.</p><h2 id="BuildingfromSources">Building from Sources</h2><p>If you intend to build Karaf from the sources, the requirements are a bit different:</p><p><strong>Hardware:</strong></p><ul><li>200 MB of free disk space for the Apache Karaf source distributions or SVN checkout, the Maven build and the dependencies Maven downloads.</li></ul><p><strong>Environment:</strong></p><ul><li>Java SE Development 
 Kit 1.6.x or greater (<a href="http://www.oracle.com/technetwork/java/javase/">http://www.oracle.com/technetwork/java/javase/</a>).</li><li>Apache Maven 3.0.3 (<a href="http://maven.apache.org/download.html">http://maven.apache.org/download.html</a>).</li></ul><h3 id="BuildingonWindows">Building on Windows</h3><p>This procedure explains how to download and install the source distribution on a Windows system. <strong>NOTE:</strong> Karaf requires Java 6 to compile, build and run.</p><ol><li>From a browser, navigate to <a href="http://karaf.apache.org/index/community/download.html">http://karaf.apache.org/index/community/download.html</a>.</li><li>Scroll down to the "Apache Karaf" section and select the desired distribution.<p>For a source distribution, the filename will be similar to: <tt>apache-karaf-x.y-src.zip</tt>.</p></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. !, % et
 c.</li><li><span id="WindowsSourceInstallation"></span> Build Karaf using Maven 3.0.3 or greater and Java 6.<p>The recommended method of building Karaf is the following:</p><pre>
-cd [karaf_install_dir]\src
-</pre><p> where <tt>karaf_install_dir</tt> is the directory in which Karaf was installed.</p><pre>
-mvn
-</pre><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<pre>
-[karaf_install_dir]\assemblies\apache-karaf\target\apache-karaf-x.y.zip
-</pre></li><li>Proceed to the <a href="start-stop#Starting Karaf.html">Starting Karaf</a> chapter.</li></ol><h3 id="BuildingonUnix">Building on Unix</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="#UnixBinaryInstallation.html">Unix Binary Installation</a> section for ideas on how to install Karaf without a browser. <strong>NOTE:</strong> Karaf requires Java 6 to compile, build and run.</p><ol><li>From a browser, navigate to <a href="http://karaf.apache.org/download.html">http://karaf.apache.org/download.html</a>.</li><li>Scroll down to the "Apache Karaf" section and select the desired distribution.<p>For a source distribution, the filename will be similar to: <tt>apache-karaf-x.y-src.tar.gz</tt>.</p></li><li>Extract the files from the tarball file into a directory of your choice. For example:<pre>
-gunzip apache-karaf-x.y-src.tar.gz
-tar xvf apache-karaf-x.y-src.tar
-</pre><p>Please remember the restrictions concerning illegal characters in Java paths, e.g. !, % etc.</p></li><li>Build Karaf using Maven:<p>The preferred method of building Karaf is the following:</p><pre>
-cd [karaf_install_dir]/src
-</pre><p> where <tt>karaf_install_dir</tt> is the directory in which Karaf was installed.</p><pre>
-mvn
-</pre></li><li>Uncompress the distribution that has just been created<pre>
-cd [karaf_install_dir]/assemblies/apache-karaf/target
-gunzip apache-karaf-x.y.tar.gz
-tar xvf apache-karaf-x.y.tar
-</pre></li><li>Proceed to the <a href="start-stop#Starting Karaf.html">Starting Karaf</a> chapter.</li></ol><h1 id="Directorystructure">Directory structure</h1><p>The directory layout of a Karaf installation is as follows:</p><ul><li><tt>/bin</tt>: startup scripts</li><li><tt>/etc</tt>: configuration files</li><li><tt>/data</tt>: working directory <ul><li><tt>/cache</tt>: OSGi framework bundle cache</li><li><tt>/generated-bundles</tt>: temporary folder used by the deployer</li><li><tt>/log</tt>: log files</li></ul></li><li><tt>/deploy</tt>: hot deploy directory</li><li><tt>/instances</tt>: directory containing <a href="users-guide/child-instances.html">child instances</a></li><li><tt>/lib</tt>: contains the bootstrap libraries<ul><li><tt>/lib/ext</tt>: directory for JRE extensions</li><li><tt>/lib/endorsed</tt>: directory for endorsed libraries</li></ul></li><li><tt>/system</tt>: OSGi bundles repository, laid out as a Maven 2 repository</li></ul><div class="tip" style="border: 1px s
 olid #090;background-color: #dfd;margin: 20px;padding: 0px 6px 0px 6px;"><p>The <tt>data</tt> folder contains all the working and temporary files for Karaf.  If you want to restart from a clean state, you can wipe out this directory, which has the same effect as <a href="start-stop#Starting Karaf from clean.html">using the clean option</a>.</p></div>	<h1 id="StartingandStoppingKaraf">Starting and Stopping Karaf</h1><p>This chapter describes how to start and stop Apache Karaf from the command line as well as from the Karaf console.</p><h2 id="StartingKaraf">Starting Karaf</h2><h3 id="OnWindows">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><pre>
-cd [karaf_install_dir]
-</pre><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><pre>
-bin\karaf.bat
-</pre><h3 id="OnUnix">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><pre>
-cd [karaf_install_dir]
-</pre><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><pre>
+</pre><h3 id="CleaningtheKarafstate">Cleaning the Karaf state</h3><p>Normally Karaf remembers the features and bundles you installed and started. The reset Karaf into a clean state just delete the data directory when karaf is not running.</p><h2 id="Summary">Summary</h2><p>This document showed how simple it is to have Apache Karaf up and running and install a simple Apache Camel application.</p><h1 id="UsersGuide">Users Guide</h1><h1 id="Installation">Installation</h1><p>Apache Karaf is a lightweight container, very easy to install and administrate, on both Unix and Windows platforms.</p><h2 id="Requirements">Requirements</h2><p><strong>Hardware:</strong></p><ul><li>50 MB of free disk space for the Apache Karaf binary distribution.</li></ul><p><strong>Operating Systems:</strong></p><ul><li>Windows: Windows 8, Windows 7, Windows 2003, Windows Vista, Windows XP SP2, Windows 2000.</li><li>Unix: RedHat Enterprise Linux, Debian, SuSE/OpenSuSE, CentOS, Fedora, Ubuntu, MacOS, AIX, HP-UX, S
 olaris, any Unix platform that supports Java.</li></ul><p><strong>Environment:</strong></p><ul><li>Java SE 1.7.x or greater (<a href="http://www.oracle.com/technetwork/java/javase/">http://www.oracle.com/technetwork/java/javase/</a>).</li><li>The JAVA_HOME environment variable must be set to the directory where the Java runtime is installed,</li></ul><h2 id="UsingApacheKarafbinarydistributions">Using Apache Karaf binary distributions</h2><p>Apache Karaf is available in two distributions, both as a tar.gz and zip archives.</p><p>The "default" distribution is a "ready to use" distribution.<br/>The "default" distribution provides the following features enabled.</p><p>The "minimal" distribution is like the minimal distributions that you can find for most of Unix distributions.<br/>Only the core layer is packaged, most of the features and bundles are downloaded from Internet at bootstrap.<br/>It means that Apache Karaf minimal distribution requires an Internet connection to start correct
 ly.<br/>The features provided by the "minimal" distribution are exactly the same as in the "default" distribution, the difference<br/>is that the minimal distribution will download the features from Internet.</p><h3 id="InstallationonWindowsplatform">Installation on Windows platform</h3><p>NB: the JAVA_HOME environment variable has to be correctly defined. To accomplish that, press Windows key and Break key together, switch to "Advanced" tab and click on "Environment Variables".</p><ol><li>From a browser, navigate to <a href="http://karaf.apache.org/index/community/download.html">http://karaf.apache.org/index/community/download.html</a>.</li><li>Download Apache Karaf binary distribution in the zip format: <tt>apache-karaf-3.0.0.zip</tt>.</li><li>Extract the files from the zip file into a directory of your choice (it's the <tt>KARAF_HOME</tt>.<p>NB: remember the restrictions concerning illegal characters in Java paths, e.g. !, % etc.</p></li><li>Apache Karaf is now installed.</li></o
 l><div class="tip" style="border: 1px solid #090;background-color: #dfd;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Handy Hint</b></p><p>In case you have to install Karaf into a very deep path or a path containing illegal characters for Java paths, e.g. !, % etc., you may add a bat file to <em>start \-> startup</em> that executes</p><pre>subst S: "C:\your very % problematic path!\KARAF"
+</pre><p>so your Karaf root directory is S: <del>-</del> which works for sure and is short to type.</p></div><h3 id="InstallationonUnixplatforms">Installation on Unix platforms</h3><p>NB: the JAVA_HOME environment variable has to be correctly defined. Check the current value using</p><pre>
+echo $JAVA_HOME
+</pre><p>If it's not correct, fix it using:</p><pre>
+export JAVA_HOME=....
+</pre><ol><li>From a browser, navigate to <a href="http://karaf.apache.org/download.html">http://karaf.apache.org/download.html</a>.</li><li>Download Apache Karaf binary distribution in the tar.gz format: <tt>apache-karaf-3.0.0.tar.gz</tt>.</li><li>Extract the files from the tar.gz file into a directory of your choice (it's the <tt>KARAF_HOME</tt>). For example:<pre>
+gunzip apache-karaf-3.0.0.tar.gz
+tar xvf apache-karaf-3.0.0.tar
+</pre><p>NB: remember the restrictions concerning illegal characters in Java paths, e.g. !, % etc.</p></li><li>Apache Karaf is now installed.</li></ol><h2 id="PostInstallationsteps">Post-Installation steps</h2><p>Thought it is not always required, it is strongly advised to set up the <tt>JAVA_HOME</tt> environment property to point to the JDK you want Apache Karaf to use before starting it.<br/>This property is used to locate the <tt>java</tt> executable and should be configured to point to the home directory of the Java SE 7 installation.</p><p>By default, all Apache Karaf files are "gather" in one directory: the <tt>KARAF_HOME</tt>.</p><p>You can define your own directory layout, by using some Karaf environment variables:</p><ul><li><tt>KARAF_DATA</tt> is the location of the data folder, where Karaf stores temporary files.</li><li><tt>KARAF_ETC</tt> is the location of the etc folder, where Karaf stores configuration files.</li><li><tt>KARAF_BASE</tt> is the Karaf base folder. By d
 efault <tt>KARAF_BASE</tt> is the same as <tt>KARAF_HOME</tt>.</li></ul><h2 id="BuildingfromSources">Building from Sources</h2><p>If you intend to build Apache Karaf from the sources, the requirements are a bit different:</p><p><strong>Hardware:</strong></p><ul><li>500 MB of free disk space for the Apache Karaf source distributions or SVN checkout, the Maven build and the dependencies Maven downloads.</li></ul><p><strong>Environment:</strong></p><ul><li>Java SE Development Kit 1.7.x or greater (<a href="http://www.oracle.com/technetwork/java/javase/">http://www.oracle.com/technetwork/java/javase/</a>).</li><li>Apache Maven 3.0.4 (<a href="http://maven.apache.org/download.html">http://maven.apache.org/download.html</a>).</li></ul><h3 id="BuildingonWindowsplatform">Building on Windows platform</h3><ol><li>You can get the Apache Karaf sources from:</li></ol><ul><li>the sources distribution <tt>apache-karaf-3.0.0-src.zip</tt> available at <a href="http://karaf.apache.org/index/community
 /download.html">http://karaf.apache.org/index/community/download.html</a>. Extract the files in the directory of your choice.</li><li>by checkout of the git repository:<pre>
+git clone https://git-wip-us.apache.org/repos/asf/karaf.git karaf
+</pre></li></ul><ol><li>Use Apache Maven to build Apache Karaf:<pre>
+mvn clean install
+</pre><p>NB: you can speed up the build by bypassing the unit tests:</p><pre>
+mvn clean install -DskipTests
+</pre></li><li>You can find the built binary distribution in <tt>assemblies\apache-karaf\target\apache-karaf-3.0.0.zip</tt>. You can install and use it as explained in the "Using Apache Karaf binary distributions" section.</li></ol><h3 id="BuildingonUnixplatforms">Building on Unix platforms</h3><ol><li>You can get the Apache Karaf sources from:</li></ol><ul><li>the sources distribution <tt>apache-karaf-3.0.0-src.tar.gz</tt> available at <a href="http://karaf.apache.org/index/community/download.html">http://karaf.apache.org/index/community/download.html</a>. Extract the files in the directory of your choice.</li><li>by checkout of the git repository:<pre>
+git clone https://git-wip-us.apache.org/repos/asf/karaf.git karaf
+</pre></li></ul><ol><li>Use Apache Maven to build Apache Karaf:<pre>
+mvn clean install
+</pre><p>NB: you can speed up the build by bypassing the unit tests:</p><pre>
+mvn clean install -DskipTests
+</pre></li><li>You can find the built binary distribution in <tt>assemblies/apache-karaf/target/apache-karaf-3.0.0.tar.gz</tt>. You can install and use it as explained in the "Using Apache Karaf binary distributions" section.</li></ol><h1 id="Directorystructure">Directory structure</h1><p>The directory layout of a Karaf installation is as follows:</p><ul><li><tt>/bin</tt>: control scripts to start, stop, login, ...</li><li><tt>/etc</tt>: configuration files</li><li><tt>/data</tt>: working directory <ul><li><tt>/cache</tt>: OSGi framework bundle cache</li><li><tt>/generated-bundles</tt>: temporary folder used by the deployers</li><li><tt>/log</tt>: log files</li></ul></li><li><tt>/deploy</tt>: hot deploy directory</li><li><tt>/instances</tt>: directory containing <a href="users-guide/instances.html">instances</a></li><li><tt>/lib</tt>: contains the bootstrap libraries<ul><li><tt>/lib/ext</tt>: directory for JRE extensions</li><li><tt>/lib/endorsed</tt>: directory for endorsed librari
 es</li></ul></li><li><tt>/system</tt>: OSGi bundles repository, laid out as a Maven 2 repository</li></ul><div class="tip" style="border: 1px solid #090;background-color: #dfd;margin: 20px;padding: 0px 6px 0px 6px;"><p>The <tt>data</tt> folder contains all the working and temporary files for Karaf.<br/>If you want to restart from a clean state, you can wipe out this directory, which has the same effect as<br/><a href="start-stop#Starting Karaf from clean.html">using the clean option</a>.</p></div>	<h1 id="Startstoprestartconnect">Start, stop, restart, connect</h1><h2 id="Start">Start</h2><p>Apache Karaf supports different start mode:</p><ul><li>the "regular" mode starts Apache Karaf in foreground, including the shell console.</li><li>the "server" mode starts Apache Karaf in foreground, without the shell console.</li><li>the "background" mode starts Apache Karaf in background.</li></ul><p>You can also manage Apache Karaf as a system service (see <a href="users-guide/wrapper.html">Sys
 tem Service</a> section of this manual).</p><h3 id="Regularmode">Regular mode</h3><p>The regular mode uses the <tt>bin/karaf</tt> Unix script (<tt>bin\karaf.bat</tt> on Windows). It's the default start process.</p><p>It starts Apache Karaf as a foreground process, and displays the shell console.</p><p>On Unix:</p><pre>
 bin/karaf
-</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>Closing the console or shell window will cause karaf to terminate.</p></div><h2 id="StartingKarafwithoutconsole">Starting Karaf without console</h2><p>Karaf can be started without the console if you don't intend to use it (one can always connect using the remote ssh access) using the following command:</p><pre>
+        __ __                  ____
+       / //_/____ __________ _/ __/
+      / ,&lt;  / __ `/ ___/ __ `/ /_
+     / /| |/ /_/ / /  / /_/ / __/
+    /_/ |_|\__,_/_/   \__,_/_/
+
+  Apache Karaf (3.0.0)
+
+Hit '&lt;tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit '&lt;ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+karaf@root()>
+</pre><p>On Windows:</p><pre>
+bin\karaf.bat
+        __ __                  ____
+       / //_/____ __________ _/ __/
+      / ,&lt;  / __ `/ ___/ __ `/ /_
+     / /| |/ /_/ / /  / /_/ / __/
+    /_/ |_|\__,_/_/   \__,_/_/
+
+  Apache Karaf (3.0.0)
+
+Hit '&lt;tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit '&lt;ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+karaf@root()>
+</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>Closing the console or shell window will cause Apache Karaf to terminate.</p></div><h3 id="Servermode">Server mode</h3><p>The server mode starts Apache Karaf as a foreground process, but it doesn't start the shell console.</p><p>To use this mode, you use the <tt>server</tt> argument to the <tt>bin/karaf</tt> Unix script (<tt>bin\karaf.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/karaf server
+
+</pre><p>On Windows:</p><pre>
 bin\karaf.bat server
-</pre><p>or, on Unix:</p><pre>
-bin\karaf server
-</pre><h2 id="StartingKarafinthebackground">Starting Karaf in the background</h2><p>Karaf can be easily started as a background process using the following command:</p><pre>
+
+</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>Closing the console or shell window will cause Apache Karaf to terminate.</p></div><p>You can connect to the shell console using SSH or client (see the Connect section in this page).</p><h3 id="Backgroundmode">Background mode</h3><p>The background mode starts Apache Karaf as a background process.</p><p>To start in background mode, you have to use <tt>bin/start</tt> Unix script (<tt>bin\start.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/start
+</pre><p>On Windows:</p><pre>
 bin\start.bat
-</pre><p>or, on Unix:</p><pre>
-bin\start
-</pre><h2 id="StartingKaraffromclean">Starting Karaf from clean</h2><p>Karaf can be reset to a clean state by simply deleting the <tt>data</tt> folder.<br/>For convenience, a parameter on the <tt>karaf</tt> and <tt>start</tt> scripts is available:</p><pre>
+</pre><p>You can connect to the shell console using SSH or client (see the Connect section in this page).</p><h3 id="Cleanstart">Clean start</h3><p>Apache Karaf stores all previously applications installed and changes that you did in the data folder.</p><p>If you want to start from a clean state, you can remove the data folder.</p><p>For convenience, you can use the <tt>clean</tt> argument to the <tt>bin/karaf</tt> Unix script (<tt>bin\karaf.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/karaf clean
+</pre><pre>
 bin/start clean
-</pre><h2 id="StoppingKaraf">Stopping Karaf</h2><p>For both Windows and Unix installations, you can perform a clean shutdown of Karaf by using the following command when inside a Karaf console:</p><pre>
-system:shutdown
-</pre><p>The shutdown command has several options you can use to change the behaviour. See <a href="commands/shutdown.html">commands/shutdown</a>.</p><p>It's also possible to delay the shutdown using the time argument. The time argument can have different formats. First, it can be an absolute time in the format hh:mm, in which hh is the hour (1 or 2 digits) and mm is the minute of the hour (in two digits). Second, it can be in the format +m, in which m is the number of minutes to wait. The work now is an alias for +0.</p><p>The following command will shutdown Karaf at 10:35am:</p><pre>
-system:shutdown 10:35
-</pre><p>The following command will shutdown Karaf in 10 minutes:</p><pre>
-system:shutdown +10
-</pre><p>If you're running from the main console, exiting the shell using <tt>logout</tt> or <tt>Ctrl+D</tt> will also terminate the Karaf instance.</p><p>From a command shell, you can run the following command:</p><pre>
-bin\stop.bat
-</pre><p>or, on Unix:</p><pre>
-bin/stop
-</pre><h1 id="ServiceWrapper">Service Wrapper</h1><h2 id="Introduction">Introduction</h2><p>The Karaf Wrapper (for service wrapper) makes it possible to install Karaf as a Windows Service. Likewise, the scripts shipped with Karaf also make it very easy to install Karaf as a daemon process on Unix systems.</p><p>The Wrapper correctly handles "user's log outs" under Windows, service dependencies, and the ability to run services which interact with the desktop.</p><h2 id="Supportedplatforms">Supported platforms</h2><p>The following platforms are supported by the Karaf Wrapper:</p><ul><li>AIX</li><li>FreeBSD</li><li>HP-UX, 32-bit and 64-bit versions</li><li>SGI Irix</li><li>Linux kernels 2.2.x, 2.4.x, 2.6.x. Known to work with Debian, Ubuntu, and Red Hat, but should work with any distribution. Currently supported on both 32-bit and 64-bit x86, Itanium, and PPC systems.</li><li>Macintosh OS X</li><li>Sun OS, Solaris 9 and 10. Currently supported on both 32-bit and 64-bit sparc, and x86 s
 ystems.</li><li>Windows - Windows 2000, XP, 2003, Vista, 2008 and Windows 7. Currently supported on both 32-bit and 64-bit x86 and Itanium systems. Also known to run on Windows 98 and ME, however due the lack of support for services in the OS, the Wrapper can be run only in console mode.</li></ul><h2 id="Installation">Installation</h2><p>Karaf Wrapper is an optional feature. To install it, simply type:</p><pre>
-karaf@root> features:install wrapper
+</pre><p>On Windows:</p><pre>
+bin\karaf.bat clean
+</pre><pre>
+bin\start.bat clean
+</pre><h3 id="Customizevariables">Customize variables</h3><p>Apache Karaf accepts environment variables:</p><ul><li><tt>JAVA_MIN_MEM</tt>: minimum memory for the JVM (default is 128M).</li><li><tt>JAVA_MAX_MEM</tt>: maximum memory for the JVM (default is 512M).</li><li><tt>JAVA_PERM_MEM</tt>: minimum perm memory for the JVM (default is JVM default value).</li><li><tt>JAVA_MAX_PERM_MEM</tt>: maximum perm memory for the JVM (default is JVM default value).</li><li><tt>KARAF_HOME</tt>: the location of your Apache Karaf installation (default is found depending where you launch the startup script).</li><li><tt>KARAF_BASE</tt>: the location of your Apache Karaf base (default is <tt>KARAF_HOME</tt>).</li><li><tt>KARAF_DATA</tt>: the location of your Apache Karaf data folder (default is <tt>KARAF_BASE/data</tt>).</li><li><tt>KARAF_ETC</tt>: the location of your Apache Karaf etc folder (default is <tt>KARAF_BASE/etc</tt>).</li><li><tt>KARAF_OPTS</tt>: extra arguments passed to the Java comman
 d line (default is null).</li><li><tt>KARAF_DEBUG</tt>: if 'true', enable the debug mode (default is null). If debug mode is enabled, Karaf starts a JDWP socket on port 5005. You can plug your IDE to define breakpoints, and run step by step.</li></ul><p>You can define these environment variables in <tt>bin/setenv</tt> Unix script (<tt>bin\setenv.bat</tt> on Windows).</p><p>For instance, to set the minimum and maximum memory size for the JVM, you can define the following values:</p><p>On Unix:</p><pre>
+# Content of bin/setenv
+export JAVA_MIN_MEM=256M
+exoprt JAVA_MAX_MEM=1024M
+</pre><p>On Windows:</p><pre>
+rem Content of bin\setenv.bat
+set JAVA_MIN_MEM=256M
+set JAVA_MAX_MEM=1024M
+</pre><h3 id="Connect">Connect</h3><p>Even if you start Apache Karaf without the console (using server or background modes), you can connect to the console.<br/>This connection can be local or remote. It means that you can access to Karaf console remotely.</p><p>To connect to the console, you can use the <tt>bin/client</tt> Unix script (<tt>bin\client.bat</tt> on Windows).</p><p>On Unix:</p><pre>
+bin/client
+Logging in as karaf
+360 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
+        __ __                  ____
+       / //_/____ __________ _/ __/
+      / ,&lt;  / __ `/ ___/ __ `/ /_
+     / /| |/ /_/ / /  / /_/ / __/
+    /_/ |_|\__,_/_/   \__,_/_/
+
+  Apache Karaf (3.0.0)
+
+Hit '&lt;tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '&lt;ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+</pre><p>On Windows:</p><pre>
+bin\client.bat
+Logging in as karaf
+360 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
+        __ __                  ____
+       / //_/____ __________ _/ __/
+      / ,&lt;  / __ `/ ___/ __ `/ /_
+     / /| |/ /_/ / /  / /_/ / __/
+    /_/ |_|\__,_/_/   \__,_/_/
+
+  Apache Karaf (3.0.0-SNAPSHOT)
+
+Hit '&lt;tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '&lt;ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+</pre><p>By default, <tt>client</tt> tries to connect on localhost, on port 8101 (the default Apache Karaf SSH port).</p><p><tt>client</tt> accepts different options to let you connect on a remote Apache Karaf instance. You can use <tt>--help</tt> to get details about the options:</p><p>On Unix:</p><pre>
+bin/client --help
+Apache Karaf client
+  -a [port]     specify the port to connect to
+  -h [host]     specify the host to connect to
+  -u [user]     specify the user name
+  --help        shows this help message
+  -v            raise verbosity
+  -r [attempts] retry connection establishment (up to attempts times)
+  -d [delay]    intra-retry delay (defaults to 2 seconds)
+  -b            batch mode, specify multiple commands via standard input
+  -f [file]     read commands from the specified file
+  [commands]    commands to run
+If no commands are specified, the client will be put in an interactive mode
+</pre><p>On Windows:</p><pre>
+bin\client.bat --help
+Apache Karaf client
+  -a [port]     specify the port to connect to
+  -h [host]     specify the host to connect to
+  -u [user]     specify the user name
+  --help        shows this help message
+  -v            raise verbosity
+  -r [attempts] retry connection establishment (up to attempts times)
+  -d [delay]    intra-retry delay (defaults to 2 seconds)
+  -b            batch mode, specify multiple commands via standard input
+  -f [file]     read commands from the specified file
+  [commands]    commands to run
+If no commands are specified, the client will be put in an interactive mode
+</pre><p>Actually, <tt>client</tt> is a SSH client. You can use any SSH client to connect, like OpenSSH (ssh command) on Unix, or Putty on Windows.</p><p>For instance, on Unix, you can do:</p><pre>
+ssh karaf@localhost -p 8101
+Authenticated with partial success.
+Authenticated with partial success.
+Authenticated with partial success.
+Password authentication
+Password:
+        __ __                  ____
+       / //_/____ __________ _/ __/
+      / ,&lt;  / __ `/ ___/ __ `/ /_
+     / /| |/ /_/ / /  / /_/ / __/
+    /_/ |_|\__,_/_/   \__,_/_/
+
+  Apache Karaf (3.0.0-SNAPSHOT)
+
+Hit '&lt;tab>' for a list of available commands
+and '[cmd] --help' for help on a specific command.
+Hit 'system:shutdown' to shutdown Karaf.
+Hit '&lt;ctrl-d>' or type 'logout' to disconnect shell from current session.
+
+karaf@root()>
+</pre><h2 id="Stop">Stop</h2><p>When you start Apache Karaf in regular mode, the <tt>logout</tt> command or CTRL-D key binding logout from the console and shutdown Apache Karaf.</p><p>When you start Apache Karaf in background mode (with the <tt>bin/start</tt> Unix script (<tt>bin\start.bat</tt> on Windows)), you can use the <tt>bin/stop</tt> Unix script (<tt>bin\stop.bat</tt> on Windows).</p><p>More generally, you can use the <tt>shutdown</tt> command (on the Apache Karaf console) that work in any case.</p><p>The <tt>shutdown</tt> command is very similar to the the <tt>shutdown</tt> Unix command.</p><p>To shutdown Apache Karaf now, you can simple using <tt>shutdown</tt>:</p><pre>
+karaf@root()> shutdown -h
+Confirm: halt instance root (yes/no):
+</pre><p>The <tt>shutdown</tt> command asks for a confirmation. If you want to bypass the confirmation step, you can use the <tt>-f</tt> (<tt>--force</tt>) option:</p><pre>
+karaf@root()> shutdown -f
+</pre><p>You can also use directly <tt>halt</tt> which is an alias to <tt>shutdown -f -h</tt>.</p><p>The <tt>shutdown</tt> command accepts a time argument. With this argument, you can define when you want to shutdown the Apache Karaf container.</p><p>The time argument can have different formats. First, it can be an absolute time in the format hh:mm, in which hh is the hour (1 or 2 digits) and mm is the minute of the hour<br/>(in two digits). Second, it can be in the format +m, in which m is the number of minutes to wait. The word <tt>now</tt> is an alias for +0.</p><p>For instance, the following command will shutdown Apache Karaf at 10:35am:</p><pre>
+karaf@root()> system:shutdown 10:35
+</pre><p>Another example to shutdown Apache Karaf in 10 minutes:</p><pre>
+karaf@root()> system:shutdown +10
+</pre><p>Like for other commands, you can find details on the <tt>shutdown</tt> command man page:</p><pre>
+karaf@root()> shutdown --help
+DESCRIPTION
+        system:shutdown
+
+        Shutdown Karaf.
+
+SYNTAX
+        system:shutdown [options] [time]
+
+ARGUMENTS
+        time
+                Shutdown after a specified delay. The time argument can have different formats. First, it can be an abolute time in the format hh:mm, in which hh is the hour (1 or 2 digits) and mm is the minute of the hour (in two digits). Second, it can be in the format +m, in which m is the number of minutes to
+                wait. The word now is an alias for +0.
+
+OPTIONS
+        -c, --clean, --clean-all, -ca
+                Force a clean restart by deleting the data directory
+        -f, --force
+                Force the shutdown without confirmation message.
+        -h, --halt
+                Halt the Karaf container.
+        --help
+                Display this help message
+        -cc, --clean-cache, -cc
+                Force a clean restart by deleting the cache directory
+        -r, --reboot
+                Reboot the Karaf container.
+</pre><h2 id="Status">Status</h2><p>When you start Apache Karaf in background mode, you may want to check the current status.</p><p>To do so, you can use the <tt>bin/status</tt> Unix script (<tt>bin\status.bat</tt> on Windows).</p><p>NB: the script returns 0 exit code if Apache Karaf is running, 1 exit code else.</p><p>On Unix:</p><pre>
+bin/status
+Not Running ...
+</pre><pre>
+bin/status
+Running ...
+</pre><p>On Windows:</p><pre>
+bin\status.bat
+Not Running ...
+</pre><pre>
+bin\status.bat
+Running ...
+</pre><h2 id="Restart">Restart</h2><p>The <tt>shutdown</tt> command accepts the <tt>-r</tt> (<tt>--restart</tt>) option to restart Apache Karaf:</p><pre>
+karaf@root()> system:shutdown -r
+</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>This command does not start a new JVM. It simply restarts the OSGi framework.</p></div><h2 id="SystemMBean">SystemMBean</h2><p>Apache Karaf provides the JMX SystemMBean dedicated to control of the container itself.</p><p>The SystemMBean object name is <tt>org.apache.karaf:type=system</tt>.</p><p>The SystemMBean provides different attributes and operations, especially operations to halt or reboot the container:</p><ul><li><tt>reboot()</tt> reboots Apache Karaf now (without cleaning the cache)</li><li><tt>reboot(time)</tt> reboots Apache Karaf at a given time (without cleaning the cache). The time format is the same as the time argument of the <tt>shutdown</tt> command.</li><li><tt>rebootCleanCache(time)</tt> reboots Apache Karaf at a given time, including the cleanup of the cache.</li><li><tt>rebootCleanAll(time)</tt> reboots Apache Karaf at 
 a given time, including the cleanup of the whole data folder.</li><li><tt>halt()</tt> shutdown Apache Karaf now.</li><li><tt>halt(time)</tt> shutdown Apache Karaf at a given time. The time format is the same as the time argument of the <tt>shutdown</tt> command.</li></ul><h1 id="IntegrationintheoperatingsystemtheServiceWrapper">Integration in the operating system: the Service Wrapper</h1><p>In the previous chapter, we saw the different scripts and commands to start, stop, restart Apache Karaf.</p><p>Instead of using these commands and scripts, you can integrate Apache Karaf directly in your operating system service control.</p><p>Apache Karaf provides the "Service Wrapper". The service wrapper allows you to directly integrate Apache Karaf:</p><ul><li>like a native Windows Service</li><li>like a Unix daemon process</li></ul><p>The "Service Wrapper" correctly handles "user's log outs" under Windows, service dependencies, and the ability to run services which interact with the desktop.
 </p><p>It also includes advanced fault detection software which monitors an application.<br/>The "Service Wrapper" is able to detect crashes, freezes, out of memory and other exception events, then automatically react by restarting Apache Karaf with a minimum of delay.<br/>It guarantees the maximum possible uptime of Apache Karaf.</p><h2 id="Supportedplatforms">Supported platforms</h2><ul><li>Windows 8, 7, 2008 R2, 2003, Vista (32 and 64 bits architecture)</li><li>Linux RedHat Enterprise Linux, Debian, CentOS, Fedora, Ubuntu (32 and 64 bits architecture)</li><li>FreeBSD 9.x, 8.x</li><li>AIX 5.x, 6.x, 7.x (Power architecture)</li><li>Solaris 8, 9, 10 (x86/Sparc, 32 and 64 bits architecture)</li><li>HP-UX 10.x, 11.x (32 and 64 bits architecture)</li><li>SGI Irix</li><li>MacOS X</li></ul><h2 id="Installation">Installation</h2><p>Apache Karaf Service Wrapper is an optional feature. You have to install the "Service Wrapper" installer first.</p><p>In the console:</p><pre>
+karaf@root()> feature:install service-wrapper
+</pre><p>Now, you have the <tt>wrapper:install</tt> command, to "register" Apache Karaf as service/daemon on your system:</p><pre>
+karaf@root()> wrapper:install --help
+DESCRIPTION
+        wrapper:install
+
+        Install the container as a system service in the OS.
+
+SYNTAX
+        wrapper:install [options]
+
+OPTIONS
+        -d, --display
+                The display name of the service.
+                (defaults to karaf)
+        --help
+                Display this help message
+        -s, --start-type
+                Mode in which the service is installed. AUTO_START or DEMAND_START (Default: AUTO_START)
+                (defaults to AUTO_START)
+        -n, --name
+                The service name that will be used when installing the service. (Default: karaf)
+                (defaults to karaf)
+        -D, --description
+                The description of the service.
+                (defaults to )
+</pre><h2 id="Installation2">Installation</h2><p>Karaf Wrapper is an optional feature. To install it, simply type:</p><pre>
+karaf@root> feature:install wrapper
 </pre><p>Once installed, wrapper feature will provide <tt>wrapper:install</tt> new command in the Karaf shell:</p><pre>
 karaf@root> wrapper:install --help
 DESCRIPTION
@@ -913,666 +1124,1173 @@ OPTIONS
         -D, --description
                 The description of the service.
                 (defaults to )
-</pre><p>Using <tt>wrapper:install</tt>, you can install Karaf as a service.</p><p>For instance, to register Karaf as a service (depending of the running OS), in automatic start mode, simply type:</p><pre>
-karaf@root> wrapper:install -s AUTO_START -n KARAF -d Karaf -D "Karaf Service"
-</pre><p>For instance, on Linux, <tt>wrapper:install</tt> command will do:</p><pre>
-karaf@root> wrapper:install -s AUTO_START -n KARAF -d Karaf -D "Karaf Service"
-Creating file: /home/onofreje/apache-karaf-2.1.3/bin/KARAF-wrapper
-Creating file: /home/onofreje/apache-karaf-2.1.3/bin/KARAF-service
-Creating file: /home/onofreje/apache-karaf-2.1.3/etc/KARAF-wrapper.conf
-Creating file: /home/onofreje/apache-karaf-2.1.3/lib/libwrapper.so
-Creating file: /home/onofreje/apache-karaf-2.1.3/lib/karaf-wrapper.jar
-Creating file: /home/onofreje/apache-karaf-2.1.3/lib/karaf-wrapper-main.jar
+</pre><p>The <tt>wrapper:install</tt> command detects the running Operating Service and provide the service/daemon ready to be integrated in your system.</p><p>For instance, on a Ubuntu/Debian Linux system:</p><pre>
+karaf@root()> wrapper:install
+Creating file: /opt/apache-karaf-3.0.0/bin/karaf-wrapper
+Creating file: /opt/apache-karaf-3.0.0/bin/karaf-service
+Creating file: /opt/apache-karaf-3.0.0/etc/karaf-wrapper.conf
+Creating file: /opt/apache-karaf-3.0.0/lib/libwrapper.so
+Creating file: /opt/apache-karaf-3.0.0/lib/karaf-wrapper.jar
+Creating file: /opt/apache-karaf-3.0.0/lib/karaf-wrapper-main.jar
 
 Setup complete.  You may wish to tweak the JVM properties in the wrapper configuration file:
-        /home/onofreje/apache-karaf-2.1.3/etc/KARAF-wrapper.conf
+        /opt/apache-karaf-3.0.0/etc/karaf-wrapper.conf
 before installing and starting the service.
 
-The way the service is installed depends upon your flavor of Linux.
 
-On Redhat/Fedora/CentOS Systems:
+Ubuntu/Debian Linux system detected:
   To install the service:
-    $ ln -s /home/onofreje/apache-karaf-2.1.3/bin/KARAF-service /etc/init.d/
-    $ chkconfig KARAF-service --add
+    $ ln -s /opt/apache-karaf-3.0.0/bin/karaf-service /etc/init.d/
 
   To start the service when the machine is rebooted:
-    $ chkconfig KARAF-service on
+    $ update-rc.d karaf-service defaults
 
   To disable starting the service when the machine is rebooted:
-    $ chkconfig KARAF-service off
+    $ update-rc.d -f karaf-service remove
 
   To start the service:
-    $ service KARAF-service start
+    $ /etc/init.d/karaf-service start
 
   To stop the service:
-    $ service KARAF-service stop
+    $ /etc/init.d/karaf-service stop
 
   To uninstall the service :
-    $ chkconfig KARAF-service --del
-    $ rm /etc/init.d/KARAF-service
+    $ rm /etc/init.d/karaf-service
 
-On Ubuntu/Debian Systems:
-  To install the service:
-    $ ln -s /home/onofreje/apache-karaf-2.1.3/bin/KARAF-service /etc/init.d/
+</pre><p>You can note that <tt>wrapper:install</tt> command detected the running operating system ("Ubuntu/Debian Linux system detected").</p><p>You have a complete explanation and list of system commands to perform to integrate Apache Karaf in your system:</p><pre>
+ln -s /opt/apache-karaf-3.0.0/bin/karaf-service /etc/init.d/
+update-rc.d karaf-service defaults
+</pre><h2 id="Uninstall">Uninstall</h2><p>The <tt>wrapper:install</tt> provides the system commands to perform to uninstall the service/daemon).</p><p>For instance, on Ubuntu/Debian, to uninstall the Apache Karaf service, you have to remove the <tt>karaf-service</tt> script from the runlevel scripts:</p><pre>
+rm /etc/init.d/karaf-service
+</pre><p>You can remove the "Wrapper Service" installer after that:</p><pre>
+karaf@root()> feature:uninstall service-wrapper
+</pre><h2 id="NoteforMacOSusers">Note for MacOS users</h2><p>On MacOS you can install the service for an user or for the system.</p><p>If you want to add bin/org.apache.karaf.KARAF as user service move this file into ~/Library/LaunchAgents/:</p><pre>
+mv bin/org.apache.karaf.KARAF.plist ~/Library/LaunchAgents/
+</pre><p>If you want to add org.apache.karaf.KARAF as system service move this into /Library/LaunchDaemons:</p><pre>
+sudo mv bin/org.apache.karaf.KARAF.plist /Library/LaunchDaemons/
+</pre><p>Change owner and rights:</p><pre>
+sudo chown root:wheel /Library/LaunchDaemons/org.apache.karaf.KARAF.plist
+sudo chmod u=rw,g=r,o=r /Library/LaunchDaemons/org.apache.karaf.KARAF.plist
+</pre><p>You can test your service:</p><pre>
+launchctl load ~/Library/LaunchAgents/org.apache.karaf.KARAF.plist
+launchctl start org.apache.karaf.KARAF
+launchctl stop org.apache.karaf.KARAF
+</pre><p>Finally, after restart your session or system you can use launchctl command to start and stop your service.</p><p>If you want to remove the service call:</p><pre>
+launchctl remove org.apache.karaf.KARAF
+</pre><h2 id="Configuration">Configuration</h2><p>When using scripts in the Apache Karaf <tt>bin</tt> folder, you can using <tt>bin/setenv</tt> Unix script (<tt>bin\setenv.bat</tt> on Windows) as described in the <a href="users-guide/start-stop.html">Start, stop, restart, connect</a> section of the documentation.</p><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p><b>Warning</b></p><p>The <tt>bin/setenv</tt> Unix script (<tt>bin\setenv.bat</tt> on Windows) is not used by the Apache Karaf Service Wrapper.</p></div><p>To configure Apache Karaf started by the Service Wrapper, you have to tune the <tt>etc/karaf-wrapper.conf</tt> file. If you provided the <tt>name</tt> option to the <tt>wrapper:install</tt> command, the file is <tt>etc/karaf-yourname.conf</tt>.</p><p>In this file, you can configure the different environment variables used by Apache Karaf. The Service Wrapper installer automatically populate these variabl
 es for you during the installation (using <tt>wrapper:install</tt> command).<br/>For instance:</p><ul><li><tt>set.default.JAVA_HOME</tt> is the <tt>JAVA_HOME</tt> used to start Apache Karaf (populated during Service Wrapper installation).</li><li><tt>set.default.KARAF_HOME</tt> is the location of your Apache Karaf installation (populated during Service Wrapper installation).</li><li><tt>set.default.KARAF_BASE</tt> is the location of your Apache Karaf installation (populated during Service Wrapper installation).</li><li><tt>set.default.KARAF_DATA</tt> is the location of the Apache Karaf data folder (populated during Service Wrapper installation).</li><li><tt>set.default.KARAF_ETC</tt> is the location of the Apache Karaf etc folder (populated during Service Wrapper installation).</li><li><tt>wrapper.java.additional</tt> is used to pass additional arguments to the Java command, indexed by the argument number. The next index to use is 11.</li><li><tt>wrapper.java.initmemory</tt> is the 
 initial JVM memory size (the <tt>-Xms</tt>). It's not set by default (JVM default).</li><li><tt>wrapper.java.maxmemory</tt> is the maximum JVM memory size (the <tt>-Xmx</tt>). It's set to 512M by default.</li><li><tt>wrapper.logfile</tt> is the location of the Service Wrapper log file. It's set to <tt>%KARAF_DATA%/log/wrapper.log</tt> by default.</li><li><tt>wrapper.logfile.loglevel</tt> is the Service Wrapper log level. It's set to <tt>INFO</tt> by default.</li><li><tt>wrapper.logfile.maxsize</tt> is the Service Wrapper log file maximum size (before rotation). It's set to <tt>10m</tt> (10MB) by default.</li><li><tt>wrapper.logfile.maxfiles</tt> is the number of Service Wrapper log files created (and rotated). It's set to <tt>5</tt> by default.</li><li><tt>wrapper.syslog.loglevel</tt> is the integration with Unix syslog daemon. By default, it's set to <tt>none</tt> meaning disabled.</li><li><tt>wrapper.ntservice.name</tt> is Windows service specific and defines the Windows service n
 ame. It's set to the <tt>name</tt> option of the <tt>wrapper:install</tt> command, or <tt>karaf</tt> by default.</li><li><tt>wrapper.ntservice.displayname</tt> is Windows service specific and defines the Windows service display name. It's set to the <tt>display</tt> option of the <tt>wrapper:install</tt> command, or <tt>karaf</tt> by default.</li><li><tt>wrapper.ntservice.description</tt> is Windows service specific and defines the Windows service description. It's set to the <tt>description</tt> option of the <tt>wrapper:install</tt> command, or empty by default.</li><li><tt>wrapper.ntservice.starttype</tt> is Windows service specific and defines if the Windows service is started automatically with the service, or just on demand. It's set to <tt>AUTO_START</tt> by default, and could be switch to <tt>DEMAND_START</tt>.</li></ul><p>This is a example of generated <tt>etc/karaf-wrapper.conf</tt> file:</p><pre>
+# ------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ------------------------------------------------------------------------
+
+#********************************************************************
+# Wrapper Properties
+#********************************************************************
+set.default.JAVA_HOME=/opt/jdk/1.7.0_21
+set.default.KARAF_HOME=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.0-SNAPSHOT
+set.default.KARAF_BASE=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.0-SNAPSHOT
+set.default.KARAF_DATA=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.0-SNAPSHOT/data
+set.default.KARAF_ETC=/home/jbonofre/workspace/karaf/karaf/assemblies/apache-karaf/target/apache-karaf-3.0.0-SNAPSHOT/etc
+
+# Java Application
+wrapper.working.dir=%KARAF_BASE%
+wrapper.java.command=%JAVA_HOME%/bin/java
+wrapper.java.mainclass=org.apache.karaf.wrapper.internal.Main
+wrapper.java.classpath.1=%KARAF_HOME%/lib/karaf-wrapper.jar
+wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar
+wrapper.java.classpath.3=%KARAF_HOME%/lib/karaf-jmx-boot.jar
+wrapper.java.classpath.4=%KARAF_HOME%/lib/karaf-jaas-boot.jar
+wrapper.java.classpath.5=%KARAF_HOME%/lib/karaf-wrapper-main.jar
+wrapper.java.classpath.6=%KARAF_HOME%/lib/karaf-org.osgi.core.jar
+wrapper.java.library.path.1=%KARAF_HOME%/lib/
+
+# Application Parameters.  Add parameters as needed starting from 1
+#wrapper.app.parameter.1=
+
+# JVM Parameters
+# note that n is the parameter number starting from 1.
+wrapper.java.additional.1=-Dkaraf.home=%KARAF_HOME%
+wrapper.java.additional.2=-Dkaraf.base=%KARAF_BASE%
+wrapper.java.additional.3=-Dkaraf.data=%KARAF_DATA%
+wrapper.java.additional.4=-Dkaraf.etc=%KARAF_ETC%
+wrapper.java.additional.5=-Dcom.sun.management.jmxremote
+wrapper.java.additional.6=-Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder
+wrapper.java.additional.7=-Dkaraf.startLocalConsole=false
+wrapper.java.additional.8=-Dkaraf.startRemoteShell=true
+wrapper.java.additional.9=-Djava.endorsed.dirs=%JAVA_HOME%/jre/lib/endorsed:%JAVA_HOME%/lib/endorsed:%KARAF_HOME%/lib/endorsed
+wrapper.java.additional.10=-Djava.ext.dirs=%JAVA_HOME%/jre/lib/ext:%JAVA_HOME%/lib/ext:%KARAF_HOME%/lib/ext
+
+# Uncomment to enable jmx
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
+
+# Uncomment to enable YourKit profiling
+#wrapper.java.additional.n=-Xrunyjpagent
+
+# Uncomment to enable remote debugging
+#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE
+#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
+
+# Initial Java Heap Size (in MB)
+#wrapper.java.initmemory=3
+
+# Maximum Java Heap Size (in MB)
+wrapper.java.maxmemory=512
+
+
+#********************************************************************
+# Wrapper Logging Properties
+#********************************************************************
+# Format of output for the console.  (See docs for formats)
+wrapper.console.format=PM
+
+# Log Level for console output.  (See docs for log levels)
+wrapper.console.loglevel=INFO
+
+# Log file to use for wrapper output logging.
+wrapper.logfile=%KARAF_DATA%/log/wrapper.log
+
+# Format of output for the log file.  (See docs for formats)
+wrapper.logfile.format=LPTM
+
+# Log Level for log file output.  (See docs for log levels)
+wrapper.logfile.loglevel=INFO
+
+# Maximum size that the log file will be allowed to grow to before
+#  the log is rolled. Size is specified in bytes.  The default value
+#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
+#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
+wrapper.logfile.maxsize=10m
+
+# Maximum number of rolled log files which will be allowed before old
+#  files are deleted.  The default value of 0 implies no limit.
+wrapper.logfile.maxfiles=5
+
+# Log Level for sys/event log output.  (See docs for log levels)
+wrapper.syslog.loglevel=NONE
+
+#********************************************************************
+# Wrapper Windows Properties
+#********************************************************************
+# Title to use when running as a console
+wrapper.console.title=karaf
+
+#********************************************************************
+# Wrapper Windows NT/2000/XP Service Properties
+#********************************************************************
+# WARNING - Do not modify any of these properties when an application
+#  using this configuration file has been installed as a service.
+#  Please uninstall the service before modifying this section.  The
+#  service can then be reinstalled.
+
+# Name of the service
+wrapper.ntservice.name=karaf
+
+# Display name of the service
+wrapper.ntservice.displayname=karaf
+
+# Description of the service
+wrapper.ntservice.description=
+
+# Service dependencies.  Add dependencies as needed starting from 1
+wrapper.ntservice.dependency.1=
+
+# Mode in which the service is installed.  AUTO_START or DEMAND_START
+wrapper.ntservice.starttype=AUTO_START
+
+# Allow the service to interact with the desktop.
+wrapper.ntservice.interactive=false
+</pre><h1 id="Usingtheconsole">Using the console</h1><h2 id="Availablecommands">Available commands</h2><p>To see a list of the available commands in the console, you can use the <tt>help</tt>:</p><pre>
+karaf@root()> help
+COMMANDS
+bundle
+bundle:capabilities               Displays OSGi capabilities of a given bundles.
+bundle:classes                    Displays a list of classes contained in the bundle
+...
+</pre><p>You have the list of all commands with a short description.</p><p>You can use the tab key to get a quick list of all commands:</p><pre>
+karaf@root()> Display all 280 possibilities? (y or n)
+...
+</pre><h2 id="Subshellandcompletionmode">Subshell and completion mode</h2><p>The commands have a scope and a name. For instance, the command <tt>feature:list</tt> has <tt>feature</tt> as scope, and <tt>list</tt> as name.</p><p>Karaf "groups" the commands by scope. Each scope form a subshell.</p><p>You can directly execute a command with its full qualified name (scope:name):</p><pre>
+karaf@root()> feature:list
+...
+</pre><p>or enter in a subshell and type the command contextual to the subshell:</p><pre>
+karaf@root()> feature
+karaf@root(feature)> list
+</pre><p>You can note that you enter in a subshell directly by typing the subshell name (here <tt>feature</tt>). You can "switch" directly from a subshell to another:</p><pre>
+karaf@root()> feature
+karaf@root(feature)> bundle
+karaf@root(bundle)>
+</pre><p>The prompt displays the current subshell between ().</p><p>The <tt>exit</tt> command goes to the parent subshell:</p><pre>
+karaf@root()> feature
+karaf@root(feature)> exit
+karaf@root()>
+</pre><p>The completion mode defines the behaviour of the tab key and the help command.</p><p>You have three different modes available:</p><ul><li>GLOBAL</li><li>FIRST</li><li>SUBSHELL</li></ul><p>You can define your default completion mode using the completionMode property in <tt>etc/org.apache.karaf.shell.cfg</tt> file. By default, you have:</p><pre>
+completionMode = GLOBAL
+</pre><p>You can also change the completion mode “on the fly” (while using the Karaf shell console) using the <tt>shell:completion</tt> command:</p><pre>
+karaf@root()> shell:completion
+GLOBAL
+karaf@root()> shell:completion FIRST
+karaf@root()> shell:completion
+FIRST
+</pre><p><tt>shell:completion</tt> can inform you about the current completion mode used. You can also provide the new completion mode that you want.</p><p>GLOBAL completion mode is the default one in Karaf 3.0.0 (mostly for transition purpose).</p><p>GLOBAL mode doesn’t really use subshell: it’s the same behavior as in previous Karaf versions.</p><p>When you type the tab key, whatever in which subshell you are, the completion will display all commands and all aliases:</p><pre>
+karaf@root()> &lt;TAB>
+karaf@root()> Display all 273 possibilities? (y or n)
+...
+karaf@root()> feature
+karaf@root(feature)> &lt;TAB>
+karaf@root(feature)> Display all 273 possibilities? (y or n)
+</pre><p>FIRST completion mode is an alternative to the GLOBAL completion mode.</p><p>If you type the tab key on the root level subshell, the completion will display the commands and the aliases from all subshells (as in GLOBAL mode).<br/>However, if you type the tab key when you are in a subshell, the completion will display only the commands of the current subshell:</p><pre>
+karaf@root()> shell:completion FIRST
+karaf@root()> &lt;TAB>
+karaf@root()> Display all 273 possibilities? (y or n)
+...
+karaf@root()> feature
+karaf@root(feature)> &lt;TAB>
+karaf@root(feature)>
+info install list repo-add repo-list repo-remove uninstall version-list
+karaf@root(feature)> exit
+karaf@root()> log
+karaf@root(log)> &lt;TAB>
+karaf@root(log)>
+clear display exception-display get log set tail
+</pre><p>SUBSHELL completion mode is the real subshell mode.</p><p>If you type the tab key on the root level, the completion displays the subshell commands (to go into a subshell), and the global aliases.<br/>Once you are in a subshell, if you type the TAB key, the completion displays the commands of the current subshell:</p><pre>
+karaf@root()> shell:completion SUBSHELL
+karaf@root()> &lt;TAB>
+karaf@root()>
+* bundle cl config dev feature help instance jaas kar la ld lde log log:list man package region service shell ssh system
+karaf@root()> bundle
+karaf@root(bundle)> &lt;TAB>
+karaf@root(bundle)>
+capabilities classes diag dynamic-import find-class headers info install list refresh requirements resolve restart services start start-level stop
+uninstall update watch
+karaf@root(bundle)> exit
+karaf@root()> camel
+karaf@root(camel)> &lt;TAB>
+karaf@root(camel)>
+backlog-tracer-dump backlog-tracer-info backlog-tracer-start backlog-tracer-stop context-info context-list context-start context-stop endpoint-list route-info route-list route-profile route-reset-stats
+route-resume route-show route-start route-stop route-suspend
+</pre><h2 id="Unixlikeenvironment">Unix like environment</h2><p>Karaf console provides a full Unix like environment.</p><h3 id="Helporman">Help or man</h3><p>We already saw the usage of the <tt>help</tt> command to display all commands available.</p><p>But you can also use the <tt>help</tt> command to get details about a command:</p><pre>
+karaf@root()> help feature:list
+DESCRIPTION
+        feature:list
 
-  To start the service when the machine is rebooted:
-    $ update-rc.d KARAF-service defaults
+        Lists all existing features available from the defined repositories.
 
-  To disable starting the service when the machine is rebooted:
-    $ update-rc.d -f KARAF-service remove
+SYNTAX
+        feature:list [options]
 
-  To start the service:
-    $ /etc/init.d/KARAF-service start
+OPTIONS
+        --help
+                Display this help message
+        -o, --ordered
+                Display a list using alphabetical order
+        -i, --installed
+                Display a list of all installed features only
+        --no-format
+                Disable table rendered output
 
-  To stop the service:
-    $ /etc/init.d/KARAF-service stop
+</pre><p>It's very similar to the <tt>man</tt> command on Unix. You can also use the <tt>man</tt> command (which is an lias to the <tt>help</tt> command):</p><pre>
+karaf@root()> man feature:list
+DESCRIPTION
+        feature:list
 
-  To uninstall the service :
-    $ rm /etc/init.d/KARAF-service
+        Lists all existing features available from the defined repositories.
 
-h2. Configuration Hints
+SYNTAX
+        feature:list [options]
 
-If you need to append parameters to the "java" invoke (like memory configurations) you add those in the KARAF-wrapper file using "wrapper.java.additional.n=PARAMETER" where "n" is the number of the additional config (typically you simply look for the last entry and use n+1) and PARAMTER is any JVM parameter you would like to append, such as "-XX:MaxPermSize=1024m".
+OPTIONS
+        --help
+                Display this help message
+        -o, --ordered
+                Display a list using alphabetical order
+        -i, --installed
+                Display a list of all installed features only
+        --no-format
+                Disable table rendered output
 
-</pre><h1 id="Configuration">Configuration</h1><p>All files in the <tt>etc</tt> directory that end with ".cfg" are loaded as config admin service pids. Changes to these config files are refelected in the config admin service.</p><p>Karaf provides a suite of commands to work on any config admin service pid grouped under <tt>config</tt>. To learn about all currently supported configuration commands type:</p><div class="table-wrap"><table class="confluenceTable"><tr><th class="confluenceTh"> Command                                </th><th class="confluenceTh"> Description   </th></tr><tr><td class="confluenceTd"> <a href="commands/config-cancel.html"><tt>cancel</tt></a>     </td><td class="confluenceTd"> Discard changes </td></tr><tr><td class="confluenceTd"> <a href="commands/config-edit.html"><tt>edit</tt></a>         </td><td class="confluenceTd"> Create or edit a configuration </td></tr><tr><td class="confluenceTd"> <a href="commands/config-list.html"><tt>list</tt></a>         </td
 ><td class="confluenceTd"> List existing configurations </td></tr><tr><td class="confluenceTd"> <a href="commands/config-property-delete.html"><tt>property-delete</tt></a>   </td><td class="confluenceTd"> Delete a property from the edited configuration </td></tr><tr><td class="confluenceTd"> <a href="commands/config-property-list.html"><tt>property-list</tt></a> </td><td class="confluenceTd"> List properties from the edited configuration </td></tr><tr><td class="confluenceTd"> <a href="commands/config-property-set.html"><tt>property-set</tt></a>   </td><td class="confluenceTd"> Set a property on the edited configuration </td></tr><tr><td class="confluenceTd"> <a href="commands/config-update.html"><tt>update</tt></a>     </td><td class="confluenceTd"> Save and propagate changes from the configuration being edited </td></tr></table></div><h2 id="Editing">Editing</h2><h3 id="a1.SelectconfigurationPIDtoedit">1. Select configuration PID to edit</h3><p>For example to edit configuration <t
 t>foo.bar</tt>:</p><pre>
-karaf@root> config:edit foo.bar
-</pre><h3 id="a2.Workonproperties">2. Work on properties</h3><p>Use the property commands to work on the properties. Any number of properties can be modified within a single editing session. </p><h3 id="a3.Updateorcanceltheedit">3. Update or cancel the edit</h3><p> * <a href="commands/config-update.html"><tt>config:update</tt></a> save all changes<br/> * <a href="commands/config-cancel.html"><tt>config:cancel</tt></a> discard all changes</p><h3 id="Modifyasingleproperty">Modify a single property</h3><p>To change a single property and commit the change in one step use:</p><pre>
-config:property-set -p &lt;pid> &lt;prop name> &lt;value>
-
-For example:
-config:property-set -p org.ops4j.pax.web org.osgi.service.http.port 8182
-</pre><h3 id="JMX">JMX</h3><p>Karaf also provides a Config MBean (org.apache.karaf:type=config) which allows work on configs using JMX.</p><h1 id="Usingtheconsole">Using the console</h1><h2 id="Viewingavailablecommands">Viewing available commands</h2><p>To see a list of the available commands in the console enter</p><pre>
-help
-</pre><p>This will show the list of all karaf commands together with a short description.</p><p>The list of all karaf commands and their usage is also available in the <a href="commands/commands.html">Commands section</a>.</p><h2 id="Tabcompletion">Tab completion</h2><p>The Karaf shell offers Tab completion at almost any place in the shell. So another way to see all commands is to <tt>&lt;tab></tt> key at the empty prompt.</p><pre>
-karaf@root> Display all 208 possibilities? (y or n)
-add-role                            add-url                             add-user                            addbundle                           addfilter                           addregion                           append-property                     bundle:capabilities
-bundle:headers                      bundle:info                         bundle:install                      bundle:list                         bundle:refresh                      bundle:requirements                 bundle:resolve                      bundle:restart
-...
-karaf@root>
-</pre><p>The <tt>&lt;tab></tt> key toggles autocompletion anywhere on the line, so if you want to see the commands in the <tt>osgi</tt> group, type the first letters and hit <tt>&lt;tab></tt>.<br/>Depending on the commands, autocompletion may be available for options and arguments too.</p><h2 id="Gettinghelpforacommand">Getting help for a command</h2><p>To view help on a particular command, type the command followed by <tt>--help</tt> or use the <tt>help</tt> command followed by the name of the command:</p><pre>
-karaf@root> features:list --help
+</pre><p>You can also use another form to get the command help, by using the <tt>--help</tt> option to the command:</p><pre>
+karaf@root()> feature:list --help
 DESCRIPTION
-        features:list
+        feature:list
 
         Lists all existing features available from the defined repositories.
 
 SYNTAX
-        features:list [options]
+        feature:list [options]
 
 OPTIONS
         --help
-                       Display this help message
+                Display this help message
+        -o, --ordered
+                Display a list using alphabetical order
         -i, --installed
-                       Display a list of all installed features only
-</pre><h2 id="More...">More...</h2><p>You'll find a more in-depth guide to the shell syntax in the <a href="developers-guide/shell-syntax.html">developers guide</a>.</p><p>The console can also be easily extended by creating new commands as explained in the <a href="developers-guide/extending-console.html">developers guide</a>.</p><h1 id="Webconsole">Web console</h1><p>The Karaf web console provides a graphical overview of the runtime.<br/>You can use it to:</p><ul><li>install and uninstall features</li><li>start, stop, install bundles</li><li>create child instances</li><li>configure Karaf</li><li>view logging informations</li></ul><h2 id="Installingthewebconsole">Installing the web console</h2><p>The web console is not installed by default.  To install it, run the following command from the Karaf prompt:</p><pre>
-root@karaf> feature:install webconsole
-</pre><p>For changing the web console port number see the <a href="users-guide/http.html">HTTPService config</a>.</p><h2 id="Accessingthewebconsole">Accessing the web console</h2><p>To access the console for an instance of Karaf running locally, enter the following address in your web browser: </p><p><a href="http://localhost:8181/system/console">http://localhost:8181/system/console</a></p><p>Log in with the username <tt>karaf</tt> and the password <tt>karaf</tt>.  If you have changed the default user or password, use the one you have configured.</p><h1 id="Usingremoteinstances">Using remote instances</h1><h2 id="Configuringsshaccess">Configuring ssh access</h2><p>It does not always make sense to manage an instance of Karaf using its local console. You can manage Karaf remotely using a the ssh console.</p><p>When you start Karaf, it enables a remote console that can be accessed over SSH from any other Karaf console or plain SSH client.  The remote console provides all the features o
 f the local console and gives a remote user complete control over the container and services running inside of it.</p><p>The SSH hostname and port number is configured in the <tt>etc/org.apache.karaf.shell.cfg</tt> configuration file with the following default values:</p><pre>
-sshPort=8101
-sshHost=0.0.0.0
-sshRealm=karaf
-hostKey=${karaf.base}/etc/host.key
-</pre><p>You can change this configuration using the <a href="users-guide/configuration.html">config commands</a> or by editing the above file, but you'll need to restart the ssh console in order for it to use the new parameters.</p><pre>
-config:property-set -p org.apache.karaf.shell sshPort 8102
-bundle:restart -f org.apache.karaf.shell.ssh
-</pre><h2 id="Connectingremotely">Connecting remotely</h2><h3 id="Usingthesshsshcommand">Using the <tt>ssh:ssh</tt> command</h3><p>You can connect to a remote Karaf's console using the <a href="commands/ssh-ssh.html"><tt>ssh:ssh</tt></a> command.</p><pre>
-karaf@root> ssh:ssh -l karaf -P karaf -p 8101 hostname
-</pre><div class="warning" style="border: 1px solid #c00;background-color: #fcc;margin: 20px;padding: 0px 6px 0px 6px;"><p>The default password is <tt>karaf</tt> but we recommend changing it. See the <a href="users-guide/security.html">security</a> section for more information.</p></div><p>To confirm that you have connected to the correct Karaf instance, type <a href="commands/shell-info.html"><tt>shell:info</tt></a> at the <tt>karaf></tt> prompt. Information about the currently connected instance is returned, as shown.</p><pre>
-Karaf
-  Karaf version               3.0.0-SNAPSHOT
-  Karaf home                  C:\java\apache-karaf-3.0.0-SNAPSHOT
-  Karaf base                  C:\java\apache-karaf-3.0.0-SNAPSHOT
-  OSGi Framework              org.apache.felix.framework - 4.0.3
-  ...
-</pre><h3 id="UsingtheKarafclient">Using the Karaf client</h3><p>The Karaf client allows to securely connect to a running local or remote Karaf instance.</p><p>For example, to quickly connect to a Karaf instance running in server mode on the same machine, run the following command:</p><pre>
-bin/client
-</pre><p>To connect to remote instances provide a hostname, port, username and password.  It is also possible to append console commands as follows:</p><pre>
-bin/client -a 8101 -h hostname -u karaf -p karaf features:install wrapper
-</pre><p>To display the available options for the client, type:</p><pre>
-> bin/client --help
-Apache Karaf client
-  -a [port]     specify the port to connect to
-  -h [host]     specify the host to connect to
-  -u [user]     specify the user name
-  -p [password] specify the password
-  --help        shows this help message
-  -v            raise verbosity
-  -r [attempts] retry connection establishment (up to attempts times)
-  -d [delay]    intra-retry delay (defaults to 2 seconds)
-  [commands]    commands to run
-If no commands are specified, the client will be put in an interactive mode
-</pre><h3 id="UsingaplainSSHclient">Using a plain SSH client</h3><p>You can also connect using a plain SSH client from your *nix system or Windows SSH client like Putty.</p><pre>
-~$ ssh -p 8101 karaf@localhost
-karaf@localhost's password: 
-</pre><h3 id="Disconnectingfromaremoteconsole">Disconnecting from a remote console</h3><p>To disconnect from a remote console, press <tt>Ctrl+D</tt>, <tt>shell:logout</tt> or simply <tt>logout</tt> at the Karaf prompt.</p><h2 id="Stoppingaremoteinstance">Stopping a remote instance</h2><h3 id="Usingtheremoteconsole">Using the remote console </h3><p>If you have connected to a remote console using the <a href="commands/ssh-ssh.html"><tt>ssh:ssh</tt></a> command or the Karaf client, you can stop the remote instance using the <a href="commands/osgi-shutdown.html"><tt>system:shutdown</tt></a> command.</p><div class="info" style="border: 1px solid #3c78b5;background-color: #D8E4F1;margin: 20px;padding: 0px 6px 0px 6px;"><p>Pressing <tt>Ctrl+D</tt> in a remote console simply closes the remote connection and returns you to the local shell.</p></div><h3 id="Usingthekarafclient">Using the karaf client</h3><p>To stop a remote instance using the Karaf client, run the following from the <tt>lib</
 tt> directory:</p><pre>
-bin/client -u karaf -p karaf -a 8101 hostname system:shutdown
-</pre><h1 id="Deployer">Deployer</h1><p>The following picture describes the architecture of the deployer.</p><p><img border="0" src="images/deployer.png"/></p><h2 id="Blueprintdeployer">Blueprint deployer</h2><p>Karaf includes a deployer that is able to deploy plain blueprint configuration files.<br/>The deployer will transform on the fly any spring configuration file dropped into the <tt>deploy</tt> folder into a valid OSGi bundle.</p><p>The generated OSGi manifest will contain the following headers:</p><pre>
-Manifest-Version: 2
-Bundle-SymbolicName: [name of the file]
-Bundle-Version: [version of the file]
-Import-Package: [required packages]
-DynamicImport-Package: *
-</pre><p>The <tt>name</tt> and <tt>version</tt> of the file are extracted using a heuristic that will match common patterns.  For example <tt>my-config-1.0.1.xml</tt> will lead to <tt>name = my-config</tt> and <tt>version = 1.0.1</tt>.<br/>The default imported packages are extracted from the spring file definition and includes all classes referenced directly.</p><p>If you need to customize the generated manifest, you can do so by including an xml element in your blueprint configuration:</p><pre>
-&lt;blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
-  &lt;manifest xmlns="http://karaf.apache.org/xmlns/deployer/blueprint/v1.0.0">
-    Require-Bundle= my-bundle
-  &lt;/manifest>
-</pre><h2 id="Springdeployer">Spring deployer</h2><p>Similar to the blueprint deployer, you can deploy spring-dm configuration files.</p><p>The generated OSGi manifest will contain the following headers:</p><pre>
-Manifest-Version: 2
-Bundle-SymbolicName: [name of the file]
-Bundle-Version: [version of the file]
-Spring-Context: *;publish-context:=false;create-asynchronously:=true

[... 3275 lines stripped ...]


Mime
View raw message