系统是centos 6.5的

下载ActiveMq的包   下载地址  http://activemq.apache.org/download.html

我下载的是   apache-activemq-5.14.5-bin.tar.gz  版本

新建activemq目录将下载好的吧上传到这个目录里

解压

tar -zxf  apache-activemq-5.14.5-bin.tar.gz

cd  到解压包里的bin目录下 启动

查看端口61616

如果用防火墙配置如下

    1. [# vi + /etc/sysconfig/iptables
    2. #添加下面两行
    3. -A INPUT -m state --state NEW -m tcp -p tcp --dport 8161 -j  ACCEPT
    4. -A INPUT -m state --state NEW -m tcp -p tcp --dport 61616 -j  ACCEPT

端口8161是访问的端口

如果没有直接ip:8161/admin   用户密码默认都是admin

可以在配置文件中修改用户密码:

打开conf/jetty.xml

将property name为authenticate的属性value="false" 改为"true",高版本的已经默认为true了

控制台的登录用户名密码保存在conf/jetty-realm.properties文件中,内容如下

值得注意的是 用户名和密码的格式是:用户名 : 密码 ,角色名

.修改客户端连接密码

1.修改activemq.xml配置,需要新增一个插件,在<broker>节点里面<systemUsage>节点前面添加如下

<plugins>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="${activemq.username}" password="${activemq.password}" groups="users,admins"/>
</users>
</simpleAuthenticationPlugin>
</plugins>

或者直接修改为(即直接将username和password赋值,所赋的值即为用户名和密码。如果使用这一种方式的话,下面的第二步则不需要了):

<plugins>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="testUserName" password="testPassword" groups="users,admins"/>
</users>
</simpleAuthenticationPlugin>
</plugins>

2.用户名密码文件为:credentials.properties

## ---------------------------------------------------------------------------
## Licensed to the Apache Software Foundation (ASF) under one or more
## contributor license agreements. See the NOTICE file distributed with
## this work for additional information regarding copyright ownership.
## The ASF licenses this file to You under the Apache License, Version 2.0
## (the "License"); you may not use this file except in compliance with
## the License. You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
## --------------------------------------------------------------------------- # Defines credentials that will be used by components (like web console) to access the broker activemq.username=system # 用户名
activemq.password=manager # 密码
guest.password=password

最新文章

  1. Android HandlerThread 总结使用
  2. C语言中inline的用法
  3. NodeJS用递归实现异步操作的链式调用,完成一个简易的命令行输入输出REPL交互接口
  4. HTTPResponse.read([amt]):只能read一次
  5. poj 1964 Cow Cycling(dp)
  6. 转:内核中的内存申请:kmalloc、vmalloc、kzalloc、kcalloc、get_free_pages
  7. org/hamcrest/SelfDescribing
  8. hdu 1251 统计难题(trie 树的简单应用)
  9. 关于CSS3 object-position/object-fit属性的使用
  10. JVM-触发Full GC的情况
  11. Gentoo(贱兔)Linux安装笔记
  12. Linux文件管理笔记
  13. MySQL 报错 1093
  14. NBU显示备份成功,但实际是无备份成功
  15. python 的__init__ 和__new__ 区别
  16. Gartner2017年BI研究计划曝光,来看看他研究的都是啥?
  17. Ontology Relations
  18. https://github.com/cobolfoo/gdx-skineditor
  19. 【转】.net 实现 语音搜索(仅限WebKit内核浏览器)
  20. [转]IA64与X86-64的区别

热门文章

  1. 爬虫(九)scrapy框架简介和基础应用
  2. gcc/g++编译器的安装与说明
  3. CentOS 7 常用命令大全
  4. SQL通配符
  5. java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.EditText
  6. UVa LA 3266 - Tian Ji -- The Horse Racing 贪心,不只处理一端,也处理另一端以理清局面 难度: 2
  7. Rsync数据同步服务
  8. 基于服务器AAA的实验
  9. SecureCRT标签显示标题
  10. JDBC连接ORACLE的三种URL格式