`
chenzhou123520
  • 浏览: 4249879 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

ActiveMQ-5.8.0 安装和启动

阅读更多

 

安装环境:linux rhe
activemq版本:5.8.0
1.从http://activemq.apache.org/download.html地址下载apache-activemq-5.8.0-bin.tar.gz包
2.解压缩到指定的目录
tar zxvf apache-activemq-5.8.0-bin.tar.gz -C /usr/local
解压缩后会在/usr/local下生成apache-activemq-5.8.0目录,其中bin目录下就是activeMQ的执行脚本存在的位置了。
3.如果启动脚本无法执行,我们需要修改一下权限
cd /usr/local/apache-activemq-5.8.0/bin
chmod 775 activemq
4.设置activeMQ配置环境.activemqrc
bin/activemq setup ~/.activemqrc
5.启动activeMQ
在activemq主目录键入如下命令: 
bin/activemq start
然后会看到控制台日志输出如下:
INFO: Loading '/home/chenzhou/.activemqrc'
INFO: Using java '/usr/java/jdk1.6.0_03/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/usr/local/apache-activemq-5.8.0/data/activemq-localhost.localdomain.pid' (pid '18567')
我们也可以把日志输出到指定的日志文件中
bin/activemq start > /tmp/smlog  2>&1 &
然后日志就输出到/tmp/smlog文件中了
注意:官方文档中标明了如果按上述的方式启动后,如果我们把linux终端窗口关闭的话,则服务也会停止
具体如下:
不过,我尝试了一下关闭xshell终端,貌似服务依然正在,没有退出。
不过为了保险起见,我们在启动时最好还是加上nohup参数
启动命令如下:
nohup bin/activemq start
或者:
nohup bin/activemq start > /tmp/smlog 2>&1 &
查看启动情况:
通过端口查询,activeMQ默认配置下启动会启动8161和61616两个端口,其中8161是mq自带的管理后台的端口,61616是mq服务默认端口:
netstat -ntlp|grep 8161
netstat -an|grep 61616
访问activeMQ管理界面,http://ip:8161/admin,如果是本机就是http://localhost:8161/admin

 

分享到:
评论
1 楼 bo_hai 2015-05-21  
总结的真好。

相关推荐

Global site tag (gtag.js) - Google Analytics