2014-10-31 06:20:28 -04:00
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!-- ============================================================================= -->
|
|
|
|
|
<!-- Copyright © 2009 Red Hat, Inc. and others. -->
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- The text of and illustrations in this document are licensed by Red Hat under -->
|
|
|
|
|
<!-- a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). -->
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- An explanation of CC-BY-SA is available at -->
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
|
|
|
|
|
<!-- of it, you must provide the URL for the original version. -->
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
|
|
|
|
|
<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
|
|
|
|
|
<!-- permitted by applicable law. -->
|
|
|
|
|
<!-- ============================================================================= -->
|
|
|
|
|
<chapter id="running">
|
|
|
|
|
<title>Starting The Server</title>
|
|
|
|
|
<section id="running.standalone">
|
2014-11-19 03:44:57 -05:00
|
|
|
|
<title>单独ActiveMQ</title>
|
|
|
|
|
<para>要运行单独的ActiveMQ服务,打开一个命令行窗口,进入到ActiveMQ的<literal>bin</literal>
|
2014-10-31 06:20:28 -04:00
|
|
|
|
目录下,执行<literal>./run.sh</literal> (或者在Windows下 <literal
|
|
|
|
|
>run.bat</literal>)。你将看到如下的输出:</para>
|
|
|
|
|
<programlisting>
|
|
|
|
|
bin$ ./run.sh
|
|
|
|
|
|
2014-11-19 03:44:57 -05:00
|
|
|
|
15:05:54,108 INFO @main [ActiveMQBootstrapServer] Starting ActiveMQ server
|
2014-10-31 06:20:28 -04:00
|
|
|
|
...
|
2014-11-19 03:44:57 -05:00
|
|
|
|
15:06:02,566 INFO @main [ActiveMQServerImpl] ActiveMQ Server version
|
2014-10-31 06:20:28 -04:00
|
|
|
|
2.0.0.CR3 (yellowjacket, 111) started
|
|
|
|
|
</programlisting>
|
2014-11-19 03:44:57 -05:00
|
|
|
|
<para>这表明ActiveMQ已经启动并运行了。</para>
|
2014-10-31 06:20:28 -04:00
|
|
|
|
<para>默认情况下,不论是启动还是停止脚本都使用<literal>config/stand-alone/non-clustered</literal>
|
|
|
|
|
下的配置文件。要使用不同的配置目录,可运行<literal>./run.sh ../config/stand-alone/clustered</literal>
|
|
|
|
|
或者其它选定的目录。同样方法适用于停止脚本。</para>
|
|
|
|
|
</section>
|
|
|
|
|
<section id="running.jboss.as5">
|
2014-11-19 03:44:57 -05:00
|
|
|
|
<title>ActiveMQ在JBoss AS 5.x中运行</title>
|
|
|
|
|
<para>要在JBoss AS 5运行ActiveMQ,你需要创建<link
|
|
|
|
|
linkend="installation.jboss.as5">安装有ActiveMQ的AS 5的配置</link>。然后用这个配置启动AS 5。
|
|
|
|
|
例如,要运行一个带有<emphasis>非集群</emphasis>的ActiveMQ服务的AS 5,进入<literal
|
2014-10-31 06:20:28 -04:00
|
|
|
|
>$JBOSS_HOME/bin</literal>目录,然后键入:</para>
|
|
|
|
|
<programlisting>
|
2014-11-19 14:58:44 -05:00
|
|
|
|
bin$ ./run.sh -c default-with-activemq
|
2014-10-31 06:20:28 -04:00
|
|
|
|
|
|
|
|
|
15:18:35,460 INFO [ServerImpl] Starting JBoss (Microcontainer)...
|
|
|
|
|
15:18:35,462 INFO [ServerImpl] Release ID: JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=
|
|
|
|
|
JBoss_5_1_0_GA date=200905221053)
|
|
|
|
|
...
|
2014-11-19 03:44:57 -05:00
|
|
|
|
15:19:30,305 INFO [ActiveMQServerImpl] ActiveMQ Server version
|
2014-10-31 06:20:28 -04:00
|
|
|
|
2.0.0.CR3 (yellowjacket, 111) started
|
|
|
|
|
...
|
|
|
|
|
15:19:43,601 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=
|
|
|
|
|
JBoss_5_1_0_GA date=200905221053)]Started in 1m:14s:556ms
|
|
|
|
|
</programlisting>
|
|
|
|
|
</section>
|
|
|
|
|
<section id="running.jboss.as4">
|
2014-11-19 03:44:57 -05:00
|
|
|
|
<title>ActiveMQ在JBoss AS 4中运行</title>
|
|
|
|
|
<para>首先按照与JBoss AS 5相同的步骤创建<link linkend="installation.jboss.as4">安装有ActiveMQ的AS 4配置
|
2014-10-31 06:20:28 -04:00
|
|
|
|
</link>然后以相同的方式启动AS。</para>
|
|
|
|
|
</section>
|
|
|
|
|
<section id="running.jboss.as6">
|
2014-11-19 03:44:57 -05:00
|
|
|
|
<title>ActiveMQ在JBoss AS 6.0中运行</title>
|
|
|
|
|
<para>从JBoss AS 6.0 M3开始,ActiveMQ已经是默认的(内建)JMS提供者。所以无需安装即可运行。</para>
|
2014-10-31 06:20:28 -04:00
|
|
|
|
</section>
|
|
|
|
|
</chapter>
|