1.安装环境要求:
Hardware:
- 40 MB of free disk space for the ActiveMQ binary distribution.
- 200 MB of free disk space for the ActiveMQ source or developer's distributions.
Operating Systems:
- Windows: Windows XP SP2, Windows 2000.
- Unix: Ubuntu Linux, Powerdog Linux, MacOS, AIX, HP-UX, Solaris, or any Unix platform that supports Java.
Environment:
- Java Developer Kit (JDK) 1.5.x or greater for deployment and 1.5.x (Java 5) for compiling/building.
- The JAVA_HOME environment variable must be set to the directory where the JDK is installed, e.g., c:\Program Files\jdk.1.5.0_07-87.
- Maven 1.0.2 or greater (required when installing source or developer's releases).
- jars that will be used must be added to the classpath.
(1) 解压 将下载得到二进制Zip包解压到磁盘一目录下,假设此目录为<install_dir>
(2) 配置 增加环境变量ACTIVEMQ_HOME = <install_dir> ,在环境变量path中增加;%ACTIVEMQ_HOME%/bin
3.windows下启动
(1) 在cmd模式,输入activemq命令,当命令行无异常抛出,且命令行阻塞在"INFO | started SelectChannelConnector@0.0.0.0:8161"这一句是说明成功启动.
(2) 启动状态下,同时按下ctrl+c键即可停止mq
注意: mq默认端口是61616, 如果端口被占用,可在<install_dir>/conf/activemq.xml文件中 <transportConnector name="openwire" uri="tcp://0.0.0.0:8081"/>中修改
4.windows下测试是否安装成功
在命令行下 输入 netstat -an|find port 或者 netstat -an|grep port port为安装为端口,默认为61616
5.监视ActiveMQ
有多种监视MQ的方法,如果你下载的mq版本是4.2以上的,那么你可以使用web 控制台监视你的mq,输入http://localhost:8161/admin
你也可是使用 JMX 支持来查看ActiveMQ的运行状态.
以上内容摘翻自: http://activemq.apache.org/version-5-getting-started.html