• linux(centos)系统安装activemq


    activemq是消息中间件,可以用来 解耦、消峰、异步

    1、下载文件

    下载:apache-activemq-5.14.0-bin.tar.gz

     可以在官网下载:http://activemq.apache.org/activemq-5140-release.html

    2、上传文件到 /usr/local/src中(路径可以自己选择)

    3、解压压缩包

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

    4、进入文件目录

    cd apache-activemq-5.14.0/bin

     启动activemq 

     ./activemq start
    

     查看activemq进程

    ps -ef| grep activemq
    

      

    5、查看防火墙端口是否开放

    如果使用了云服务器需要先开启8161(web管理页面端口)、61616(activemq服务监控端口) 两个端口

    firewall-cmd --list-ports  #查看防火墙开放端口列表  

    如果没有8161和61616这两个端口,增加开放这两个端口  (具体解释可以看:https://www.cnblogs.com/pxblog/p/12222150.html

    [root@host-172-16-2-46 bin]# firewall-cmd --zone=public --add-port=8161/tcp --permanent      #开放8161端口
    success
    [root@host-172-16-2-46 bin]# firewall-cmd --zone=public --add-port=61616/tcp --permanent     #开放61616端口     
    success
    [root@host-172-16-2-46 bin]# firewall-cmd --reload                                           #重启防火墙 
    success
    

      启动防火墙:service firewalld start  

    6、打开web管理页面

    http://服务器IP:8161/admin
    默认用户名密码 admin/admin 

     可以在安装目录的conf/jetty-realm.properties文件中修改默认密码

    7、增加新账号密码

    打开conf/activemq.xml文件

    [root@host-172-16-2-46 conf]# vim activemq.xml
    

       在broker标签下添加以下代码(账号和密码可以自己设置,这就是开发连接使用的账号密码)

    <plugins>
    			<simpleAuthenticationPlugin>
    				<users>
    					<authenticationUser username="aaa" password="bbb" groups="users,admins"/>
    				</users>
    			</simpleAuthenticationPlugin>
    		</plugins>
    

      

     如同所示

     

  • 相关阅读:
    Android 禁用以及捕捉home键
    android中正确导入第三方jar包
    使用SharedPreferences进行数据存储
    tomcat不安全因素
    spring边边角角
    宏定义
    C++变量对比java变量所占内存
    结构指针的分析
    对结构使用指针
    什么是程序文件?
  • 原文地址:https://www.cnblogs.com/pxblog/p/12222231.html
Copyright © 2020-2023  润新知