ActiveMQ安装及配置

启动 ActiveMQ

There now follows instructions on how to run the ActiveMQ Message Broker.

On Windows:

From a console window, change to the installation directory and run ActiveMQ:

cd [activemq_install_dir]

where activemq_install_dir is the directory in which ActiveMQ was installed, e.g., c:/Program Files/ActiveMQ-4.x.
Then type:

bin/activemq

NOTE: Working directories get created relative to the current directory. To create working directories in the proper place, ActiveMQ must be launched from its home/installation directory.

On Unix:

SHELL命令行模式下,通过下面命令进入到ActiveMQ安装目录:

cd [activemq_install_dir]

然后输入下面命令启动ActiveMQ:
bin/activemq

   
   
    
     
   
   

   
   
    
     
   
   
bin/activemq > /tmp/smlog  2>&1 &;
Note: /tmp/smlog may be changed to another file name.

NOTE: Working directories get created relative to the current directory. To create working directories in the proper place, ActiveMQ must be launched from its home/installation directory.

Warning

Do NOT close the console or shell in which ActiveMQ was started, as that will terminate ActiveMQ (unless ActiveMQ was started with nohup).

nohup bin/activemq > /tmp/smlog 2>&1 &

WEB监控 ActiveMQ

There are various ways to monitor ActiveMQ. If you are on version 4.2 or later of ActiveMQ you can then monitor ActiveMQ using the Web Console by pointing your browser at

http://localhost:8161/admin

Or you can use the JMX support to view the running state of ActiveMQ.

停止ActiveMQ

不管在WINDOWS还是UNIX, ActiveMQ 正在运行的控制台或SHELL命令行下输入"CTRL-C" 来终止运行

如果 ActiveMQ 是在后台启动,则可通过以下方法停止:

ps -ef|grep activemq
kill [PID]
  [PID] 就是ActiveMQ 运行的进程ID.

配置 ActiveMQ

The ActiveMQ broker should now run. You can configure the broker by specifying an Xml Configuration file as a parameter to the activemq command. An alternative is to use the Broker Configuration URI to configure things on the command line in a concise format (though the configuration options are not as extensive as if you use Java or XML code). You can also

Also see Configuring Transports to see how you can configure the various connection, transport and broker options using the connection URL in the ActiveMQConnectionFactory.

See the Initial Configuration for details of which jars you need to add to your classpath to start using ActiveMQ in your Java code

If you want to use JNDI to connect to your JMS provider then please view the JNDI Support. If you are a Spring user you should read about Spring Support

After the installation, ActiveMQ is running with a basic configuration. For details on configuring options, please see refer to the Configuration section.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值