您的位置:首页 > 其它

ActiveMQ5官方文档翻译

2016-08-03 10:17 260 查看
其实英文一直不好,但是现在一些技术,必须靠看英文文档才能学到,所以今天试着翻译一下ActiveMQ 的官方部署文档。

部署ActiveMQ-控制台

=================================

从ActiveMQ5.9起ActiveMQ附带一个WEB控制台

通常的访问路径是:

  http://localhost:8161/admin/
Active默认配置自动启动web控制台的VM代理,控制台是非常方便的

 http://localhost:8161/admin/.

控制台代理也许会询问第一次登陆的用户

默认的用户名和密码是 admin/admin

在 conf/jetty-real.properties 文件,你可以配置默认的登陆控制台的用户,

并且在这个文件你能够配置不能够登陆控制台的用户。

通过JMS和JMX代理,有可能开启一个单独的虚拟机用来启动控制台,原因是也许为了包含

增强其本身的可靠性(例如 嵌入式的控制台能够使用所有可靠的内存资源)或者是对主从系统的监控

仅仅部署你优先的servlet容器加入 apache-activemq.jar JAR包,为的是容器路径下包含它

(如在tomcat common/lib 在 Jetty的 lib的目录下)这两个选择都可以配置代理和JMS等。

 * 系统属性

   -----------------

     指定以下的系统属性到WEB容器当中:

         -Dwebconsole.type=properties   属性

         -Dwebconsole.jms.url=<url of the broker> (如. tcp://localhost:61616)   代理的URL

         -Dwebconsole.jmx.url=<jmx url to the broker> (如. service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi) JMS代理的URL

 

 * JNDI JAVA命名和目录接口

   ----

     如果你的servlet容器可以支持使用JNDI,可以使用 JMS-ConnectionFactory

     配置以外的war包:
java:comp/env/jms/connectionFactory: javax.jms.ConnectionFactory for the broker
java:comp/env/jmx/url: URL of the brokers JMX (Type java.lang.String)       

安装控制台到 Apache Karaf / Apache ServiceMix

-----------------------------------------------------------

如果你正在使用 Apache Karaf, 你可以安装 ActiveMQ 代理或者客户端 在容器中使用它:

  chooseurl activemq 5.9.0

安装代理:

   安装 activemq-broker

或者安转客户单 (控制台不可使用):

   安装activemq-client

通过看上下文路径控制台访问列表,你可以看web的访问路径,

通常是: http://localhost:8181/activemqweb
主从监控

-----------------------

安装jms/jmx的主从控制台

监控如下 (系统属性, 这个也可以使用 JNDI):

   -Dwebconsole.jms.url=failover:(tcp://serverA:61616,tcp://serverB:61616)

   -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://serverA:1099/jmxrmi,service:jmx:rmi:///jndi/rmi://serverB:1099/jmxrmi

配置主从控制台式不再可靠的,配置时需要一定的备份。

以下为原文
Deploying the ActiveMQ-WebConsole

=================================

From ActiveMQ 5.9 onwards ActiveMQ ships with a web console which

is accessible at its usual location at:

  http://localhost:8161/admin/
In the default configuration ActiveMQ automatically starts the web console in the

same VM as the broker. The console is accessibly under http://localhost:8161/admin/.
The broker may ask for credentials to login the web console the first time.

The default username and password is admin/admin. 

In the web console you can configure the default users, in the

conf/jetty-real.properties file. And in the conf/jetty.xml file you can configure

to disable login for the web consoles.

However it's also possible to start the web console in a separate VM and connect it

to the broker via JMS and JMX. The reasons to do so may include increased reliability

of the broker itself (f.e. the embedded web console could use up all the available

memory) or the monitoring of a master/slave system.

Just deploy the war into your preferred servlet container and add the apache-activemq.jar

to the classpath of the container (f.e. under Tomcat that'd be common/lib and under

Jetty the lib-directory). Two options are available for the configuration of the broker

and jmx uri(s):

 * System Properties

   -----------------

     Specify the following system properties in your web container:

         -Dwebconsole.type=properties

         -Dwebconsole.jms.url=<url of the broker> (f.e. tcp://localhost:61616)

         -Dwebconsole.jmx.url=<jmx url to the broker> (f.e. service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi)

 * JNDI

   ----

     If your servlet container supports JNDI it's possible to use a JMS-ConnectionFactory

     configured outside the war:
java:comp/env/jms/connectionFactory: javax.jms.ConnectionFactory for the broker
java:comp/env/jmx/url: URL of the brokers JMX (Type java.lang.String)       

Installing Web consoles in Apache Karaf / Apache ServiceMix

-----------------------------------------------------------

If you are using Apache Karaf, you can install ActiveMQ broker / client into the container using:

   features:chooseurl activemq 5.9.0

To install the broker:

   features:install activemq-broker

or the client only (web console not available):

   features:install activemq-client

You can then use web:list to see the context-path the console is accessible,

that is usually: http://localhost:8181/activemqweb
Master/Slave monitoring

-----------------------

To configure the web console to monitor a master/slave configuration configure the jms/jmx

as follows (system properties shown, but this option is also available when using JNDI):

   -Dwebconsole.jms.url=failover:(tcp://serverA:61616,tcp://serverB:61616)

   -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://serverA:1099/jmxrmi,service:jmx:rmi:///jndi/rmi://serverB:1099/jmxrmi

With this configuration the web console with switch to the slave as the master is no longer

available and back as soon as the master is back up.

本文来自CSDN 用户 Nothing http://write.blog.csdn.net/postedit/52100362


</pre><pre code_snippet_id="1802768" snippet_file_name="blog_20160803_13_1258721" name="code" class="plain">
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: