分享

activemq配置安装

 印度阿三17 2019-04-22

1、了解JMS查看百度百科

https://baike.baidu.com/item/JMS/2836691?fr=aladdin

2、了解ActiveMQ

https://baike.baidu.com/item/ActiveMQ

3、mq的安装

  1、首先去http://activemq./download.html 下载最新版本5.15.5release, 解压apache-activemq-5.15.5-bin.zip(或者apache-activemq-5.15.5-bin.tar.gz)

  2、放到安装的路径进行解压

tar -zxvf apache-activemq-5.15.5-bin.tar.gz  

  3、修改端口(不改为默认端口)

    ActiveMQ 需要用到两个端口

    一个是消息通讯的端口(默认为 61616)

    打开conf目录下得到activemq.xml的配置文件,找到下面这端代码,把61616替换成你的新端口号    

<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
<transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
</transportConnectors>

一个是管理控制台端口(默认为 8161)可在 conf/jetty.xml 中修改,如下:

<bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start"> 
  <!-- the default port number for the web console --> 
  <property name="host" value="0.0.0.0"/>
service iptables restart 

  

<property name="port" value="8161"/> </bean>

4、修改防火墙打开对应端口

vi /etc/sysconfig/iptables   

添加

-A INPUT -m state --state NEW -m tcp -p tcp --dport 61616 -j ACCEPT 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8161 -j ACCEPT 

重启防火墙:

service iptables restart 

5、启动:ActiveMQ/bin下

./activemq start 

6、查看是否启动成功

查看activemq端口是否打开(默认61616)

netstat -an | grep 61616 

或者直接访问:http://127.0.0.1:8161/admin(ip是安装的IP地址)

用户名:admin 密码:admin

出现此图成功

 

 

来源:http://www./content-4-170801.html

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多