You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by bu...@apache.org on 2015/07/04 08:26:07 UTC

svn commit: r956906 - in /websites/production/activemq/content: cache/cms.pageCache cache/main.pageCache cache/nms.pageCache unix-shell-script.html

Author: buildbot
Date: Sat Jul  4 06:26:06 2015
New Revision: 956906

Log:
Production update by buildbot for activemq

Modified:
    websites/production/activemq/content/cache/cms.pageCache
    websites/production/activemq/content/cache/main.pageCache
    websites/production/activemq/content/cache/nms.pageCache
    websites/production/activemq/content/unix-shell-script.html

Modified: websites/production/activemq/content/cache/cms.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/activemq/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/activemq/content/cache/nms.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/activemq/content/unix-shell-script.html
==============================================================================
--- websites/production/activemq/content/unix-shell-script.html (original)
+++ websites/production/activemq/content/unix-shell-script.html Sat Jul  4 06:26:06 2015
@@ -82,17 +82,17 @@
   <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="UnixShellScript-/*&lt;![CDATA[*/div.rbtoc1435987421448{padding:0px;}div.rbtoc1435987421448ul{list-style:disc;margin-left:0px;}div.rbtoc1435987421448li{margin-left:0px;padding-left:0px;}/*]]&gt;*/#UnixShellScript-Functionaloverview#UnixShellScript-Functionalover"><style type="text/css">/*<![CDATA[*/
-div.rbtoc1435987421448 {padding: 0px;}
-div.rbtoc1435987421448 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1435987421448 li {margin-left: 0px;padding-left: 0px;}
+<div class="wiki-content maincontent"><h2 id="UnixShellScript-/*&lt;![CDATA[*/div.rbtoc1435990910917{padding:0px;}div.rbtoc1435990910917ul{list-style:disc;margin-left:0px;}div.rbtoc1435990910917li{margin-left:0px;padding-left:0px;}/*]]&gt;*/#UnixShellScript-Functionaloverview#UnixShellScript-Functionalover"><style type="text/css">/*<![CDATA[*/
+div.rbtoc1435990910917 {padding: 0px;}
+div.rbtoc1435990910917 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1435990910917 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></h2><div class="toc-macro rbtoc1435987421448">
+/*]]>*/</style></h2><div class="toc-macro rbtoc1435990910917">
 <ul class="toc-indentation"><li><a shape="rect" href="#UnixShellScript-"></a></li></ul>
 <ul><li><a shape="rect" href="#UnixShellScript-Functionaloverview">Functional overview</a></li><li><a shape="rect" href="#UnixShellScript-Configuringtheinit-script">Configuring the init-script</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#UnixShellScript-Version5.11.0andhigher">Version 5.11.0 and higher</a>
-<ul class="toc-indentation"><li><a shape="rect" href="#UnixShellScript-Configurationfileoftheinit-script">Configuration file of the init-script</a></li><li><a shape="rect" href="#UnixShellScript-Runningmultipleinstances">Running multiple instances</a></li><li><a shape="rect" href="#UnixShellScript-Versionsprior5.11.0">Versions prior 5.11.0</a></li></ul>
-</li><li><a shape="rect" href="#UnixShellScript-Runningactivemqasaunixdaemon">Running activemq as a unix daemon</a></li></ul>
+<ul class="toc-indentation"><li><a shape="rect" href="#UnixShellScript-Configurationfileoftheinit-script">Configuration file of the init-script</a></li><li><a shape="rect" href="#UnixShellScript-Versionsprior5.11.0">Versions prior 5.11.0</a></li></ul>
+</li><li><a shape="rect" href="#UnixShellScript-Runningactivemqasaunixdaemon">Running activemq as a unix daemon</a></li><li><a shape="rect" href="#UnixShellScript-Runningmultipleinstances">Running multiple instances</a></li></ul>
 </li><li><a shape="rect" href="#UnixShellScript-Testingandreportinginteroperabilityproblemsforunixplatforms">Testing and reporting interoperability problems for unix platforms</a></li></ul>
 </div><h1 id="UnixShellScript-Functionaloverview">Functional overview</h1><p>From version <strong>5.4.0</strong> onwards, ActiveMQ comes with a enhanced shell script for starting, stopping and managing the broker in Unix environment. For basic <a shape="rect" href="activemq-command-line-tools-reference.html">activemq</a> and <a shape="rect" href="activemq-command-line-tools-reference.html">activemq-admin</a> scripts functionality take a look at <a shape="rect" href="activemq-command-line-tools-reference.html">ActiveMQ Command Line Tools Reference</a>.</p><p>This <code>activemq</code> script incorporate these two scripts into one and adds some new functionalities. On top of regular <code>activemq</code> and <code>activemq-admin</code> scripts, it adds the following features:</p><ul><li><p><strong>start</strong> - starts the broker in background. It saves process id in the <code>${ACTIVEMQ_DATA_DIR}/activemq.pid</code> for future reference. It accepts the same command line arguments l
 ike the original <code>activemq</code> script, so you can do something like</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">bin/activemq start xbean:conf/activemq-stomp.xml</pre>
@@ -111,7 +111,7 @@ bin/activemq purge --jmxurl service:jmx:
 </div></div></li><li><p><strong>query</strong> - Display selected broker component's attributes and statistics</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">bin/activemq query # use jmx access data from configuration
 bin/activemq query --jmxurl service:jmx:rmi:///jndi/rmi://127.0.0.1:11098/jmxrmi --jmxuser controlRole --jmxpassword abcd1234</pre>
-</div></div></li></ul><h1 id="UnixShellScript-Configuringtheinit-script">Configuring the init-script</h1><p>For ActiveMQ server to run properly some basic system variables must be set. These variables define how much memory broker will have, SSL, logging, JAAS options and similar.</p><h2 id="UnixShellScript-Version5.11.0andhigher">Version 5.11.0 and higher</h2><h3 id="UnixShellScript-Configurationfileoftheinit-script">Configuration file of the init-script</h3><p>Since version 5.11.0, all default configuration variables are moved to the new <code>env</code> script file, so that they can be easily inspected and configured in a easy way. <br clear="none">There are also other configuration locations</p><p>The script scans the following locations for configurations in the following order:</p><ol><li>/etc/default/activemq</li><li>$HOME/.activemqrc</li><li>$INSTALLDIR/apache-activemq-&lt;version&gt;/bin/env</li></ol><p>The first existing file is read exclusively - all other files are ignor
 ed. <br clear="none">Undefined values are discovered in a automated way.</p><h3 id="UnixShellScript-Runningmultipleinstances">Running multiple instances</h3><p>To use addtional configurations for running multiple instances on the same operating system rename or symlink script to a name matching to <code>activemq-instance-&lt;INSTANCENAME&gt;</code>.<br clear="none">This changes the configuration location to <code>/etc/default/activemq-instance-&lt;INSTANCENAME&gt;</code> and <code>$HOME/.activemqrc-instance-&lt;INSTANCENAME&gt;</code>. Configuration files in /etc have higher precedence.</p><h3 id="UnixShellScript-Versionsprior5.11.0">Versions prior 5.11.0</h3><p>These parameters were configurable in <code>activemq</code> script itself. <br clear="none"><br clear="none">You could use <code>setup</code> command to create additional system wide defaults file to configure the broker.<br clear="none">(modify the settings in this file if neccessary - the default entries look a bit garbled
  due to an accidentally applied bugfix in this release)</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div></li></ul><h1 id="UnixShellScript-Configuringtheinit-script">Configuring the init-script</h1><p>For ActiveMQ server to run properly some basic system variables must be set. These variables define how much memory broker will have, SSL, logging, JAAS options and similar.</p><h2 id="UnixShellScript-Version5.11.0andhigher">Version 5.11.0 and higher</h2><h3 id="UnixShellScript-Configurationfileoftheinit-script">Configuration file of the init-script</h3><p>Since version 5.11.0, all default configuration variables are moved to the new <code>env</code> script file, so that they can be easily inspected and configured in a easy way. <br clear="none">There are also other configuration locations</p><p>The script scans the following locations for configurations in the following order:</p><ol><li>/etc/default/activemq</li><li>$HOME/.activemqrc</li><li>$INSTALLDIR/apache-activemq-&lt;version&gt;/bin/env</li></ol><p>The first existing file is read exclusively - all other files are ignor
 ed. <br clear="none">Undefined values are discovered in a automated way.</p><h3 id="UnixShellScript-Versionsprior5.11.0">Versions prior 5.11.0</h3><p>These parameters were configurable in <code>activemq</code> script itself. <br clear="none"><br clear="none">You could use <code>setup</code> command to create additional system wide defaults file to configure the broker.<br clear="none">(modify the settings in this file if neccessary - the default entries look a bit garbled due to an accidentally applied bugfix in this release)</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: bash; gutter: false; theme: Default" style="font-size:12px;">./activemq setup /etc/default/activemq</pre>
 </div></div><p>The configuration of the script can be placed at <code>/etc/default/activemq</code> or <code>$HOME/.activemqrc</code>. Note, this is the configuration for the <em>script</em> not for configuring ActiveMQ.</p><p>To use addtional configurations for running multiple instances on the same operating system rename or symlink script to a name matching to <code>activemq-instance-&lt;INSTANCENAME&gt;</code>. This changes the configuration location to <code>/etc/default/activemq-instance-&lt;INSTANCENAME&gt;</code> and <code>$HOME/.activemqrc-instance-&lt;INSTANCENAME&gt;</code>. Configuration files in /etc have higher precedence.</p><h2 id="UnixShellScript-Runningactivemqasaunixdaemon">Running activemq as a unix daemon</h2><ul><li><p>Install activemq broker as "root" to be run as "activemq"</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">useradd -m activemq -d /srv/activemq
@@ -133,7 +133,20 @@ chkconfig activemq on
 
 # Debian/Ubuntu
 update-rc.d defaults activemq</pre>
-</div></div></li></ul><h1 id="UnixShellScript-Testingandreportinginteroperabilityproblemsforunixplatforms">Testing and reporting interoperability problems for unix platforms</h1><p>&#160;</p><p>The activemq repo provides a testsuite to validate the proper operation of the unix shell script on different platforms.</p><ul><li><p>Download the testsuite<br clear="none">Alternatively clone the sourcecode repo (<a shape="rect" href="source.html">Source</a>) and pick the file <em>assembly/src/test/scripts/init-script-testsuite</em></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div></li></ul><h2 id="UnixShellScript-Runningmultipleinstances">Running multiple instances</h2><p>To use additional configurations for running multiple instances on the same operating system rename or symlink script to a name matching to <code>activemq-instance-&lt;INSTANCENAME&gt;</code>.<br clear="none">This changes the configuration location to <code>/etc/default/activemq-instance-&lt;INSTANCENAME&gt;</code> and <code>$HOME/.activemqrc-instance-&lt;INSTANCENAME&gt;</code>. Configuration files in /etc have higher precedence.</p><p>Example procedure suitable to the procedure "Running activemq as a unix daemon"</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Example</b></div><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">mkdir /srv/activemq/instance1
+cp -av /srv/activemq/current/conf/ /srv/activemq/instance1/
+mkdir /srv/activemq/instance1/{data,tmp}
+ln -snf  /srv/activemq/current/bin/activemq /etc/init.d/activemq-instance-test1
+cp /srv/activemq/install/bin/env /etc/default/activemq-instance-instance-test1</pre>
+</div></div><p>Modify the configuration variables in /etc/default/activemq-instance-instance-test1</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">ACTIVEMQ_HOME="/srv/activemq/current/"
+ACTIVEMQ_CONF="/srv/activemq/instance1/conf"
+ACTIVEMQ_DATA="/srv/activemq/instance1/data"
+ACTIVEMQ_TMP="/srv/activemq/instance1/tmp"</pre>
+</div></div><p>Control the instance</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">/etc/init.d/activemq-instance1 start|stop|restart|console|....</pre>
+</div></div><p>&#160;</p><h1 id="UnixShellScript-Testingandreportinginteroperabilityproblemsforunixplatforms">Testing and reporting interoperability problems for unix platforms</h1><p>&#160;</p><p>The activemq repo provides a testsuite to validate the proper operation of the unix shell script on different platforms.</p><ul><li><p>Download the testsuite<br clear="none">Alternatively clone the sourcecode repo (<a shape="rect" href="source.html">Source</a>) and pick the file <em>assembly/src/test/scripts/init-script-testsuite</em></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">cd /tmp
 wget -c "https://git-wip-us.apache.org/repos/asf?p=activemq.git;a=blob_plain;f=assembly/src/test/scripts/init-script-testsuite;hb=HEAD"</pre>
 </div></div></li><li><p>Execute the testsuite</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">