activemq版本   5.15.0

程序路径  /app/activemq61616.1616/

配置文件路径     /app/activemq61616.1616/conf

修改配置文件jetty.xml第32行跟38行,true改为false

修改完成,重启MQ服务。

jetty.xml配置文件内容如下

1     <!--
2         Licensed to the Apache Software Foundation (ASF) under one or morecontributor3         license agreements. See the NOTICE file distributed with this work foradditional4         information regarding copyright ownership. The ASF licenses this fileto You under5         the Apache License, Version 2.0 (the "License"); you may not use this file except in
6 compliance with the License. You may obtain a copy of the License at7
8         http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or
9         agreed to inwriting, software distributed under the License is distributed on an10         "AS IS"BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or11         implied. See the License forthe specific language governing permissions and12 limitations under the License.13     -->
14     <!--
15         An embedded servlet engine forserving up the Admin consoles, REST and Ajax APIs and16         some demos Include this file inyour configuration to enable ActiveMQ web components17         e.g. <import resource="jetty.xml"/>
18     -->
19 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
21
22     <bean id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService">
23         <property name="name" value="ActiveMQRealm" />
24         <property name="config" value="${activemq.conf}/jetty-realm.properties" />
25     </bean>
26
27     <bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint">
28         <property name="name" value="BASIC" />
29         <property name="roles" value="user,admin" />
30         <!-- set authenticate=false to disable login -->
31         <property name="authenticate" value="false" />
32     </bean>
33     <bean id="adminSecurityConstraint" class="org.eclipse.jetty.util.security.Constraint">
34         <property name="name" value="BASIC" />
35         <property name="roles" value="admin" />
36          <!-- set authenticate=false to disable login -->
37         <property name="authenticate" value="false" />
38     </bean>
39     <bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
40         <property name="constraint" ref="securityConstraint" />
41         <property name="pathSpec" value="/api/*,/admin/*,*.jsp" />
42     </bean>
43     <bean id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
44         <property name="constraint" ref="adminSecurityConstraint" />
45         <property name="pathSpec" value="*.action" />
46     </bean>
47
48     <bean id="rewriteHandler" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
49         <property name="rules">
50             <list>
51                 <bean id="header" class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
52                   <property name="pattern" value="*"/>
53                   <property name="name" value="X-FRAME-OPTIONS"/>
54                   <property name="value" value="SAMEORIGIN"/>
55                 </bean>
56             </list>
57         </property>
58     </bean>
59
60     <bean id="secHandlerCollection" class="org.eclipse.jetty.server.handler.HandlerCollection">
61         <property name="handlers">
62             <list>
63                    <ref bean="rewriteHandler"/>
64                 <bean class="org.eclipse.jetty.webapp.WebAppContext">
65                     <property name="contextPath" value="/admin" />
66                     <property name="resourceBase" value="${activemq.home}/webapps/admin" />
67                     <property name="logUrlOnStart" value="true" />
68                 </bean>
69                 <bean class="org.eclipse.jetty.webapp.WebAppContext">
70                     <property name="contextPath" value="/api" />
71                     <property name="resourceBase" value="${activemq.home}/webapps/api" />
72                     <property name="logUrlOnStart" value="true" />
73                 </bean>
74                 <bean class="org.eclipse.jetty.server.handler.ResourceHandler">
75                     <property name="directoriesListed" value="false" />
76                     <property name="welcomeFiles">
77                         <list>
78                             <value>index.html</value>
79                         </list>
80                     </property>
81                     <property name="resourceBase" value="${activemq.home}/webapps/" />
82                 </bean>
83                 <bean id="defaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler">
84                     <property name="serveIcon" value="false" />
85                 </bean>
86             </list>
87         </property>
88     </bean>
89     <bean id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler">
90         <property name="loginService" ref="securityLoginService" />
91         <property name="authenticator">
92             <bean class="org.eclipse.jetty.security.authentication.BasicAuthenticator" />
93         </property>
94         <property name="constraintMappings">
95             <list>
96                 <ref bean="adminSecurityConstraintMapping" />
97                 <ref bean="securityConstraintMapping" />
98             </list>
99         </property>
100         <property name="handler" ref="secHandlerCollection" />
101     </bean>
102
103     <bean id="contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection">
104     </bean>
105
106     <bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start">
107              <!-- the default port number for the web console -->
108         <property name="host" value="0.0.0.0"/>
109         <property name="port" value="1616"/>
110     </bean>
111
112     <bean id="Server" depends-on="jettyPort" class="org.eclipse.jetty.server.Server"
113         destroy-method="stop">
114
115         <property name="handler">
116             <bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
117                 <property name="handlers">
118                     <list>
119                         <ref bean="contexts" />
120                         <ref bean="securityHandler" />
121                     </list>
122                 </property>
123             </bean>
124         </property>
125
126     </bean>
127
128     <bean id="invokeConnectors" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
129         <property name="targetObject" ref="Server" />
130         <property name="targetMethod" value="setConnectors" />
131         <property name="arguments">
132         <list>
133                <bean id="Connector" class="org.eclipse.jetty.server.ServerConnector">
134                    <constructor-arg ref="Server" />
135                     <!-- see the jettyPort bean -->
136                    <property name="host" value="#{systemProperties['jetty.host']}" />
137                    <property name="port" value="#{systemProperties['jetty.port']}" />
138                </bean>
139                 <!--
140                     Enable this connector ifyou wish to use https with web console141                 -->
142                 <!-- bean id="SecureConnector" class="org.eclipse.jetty.server.ServerConnector">
143                     <constructor-arg ref="Server" />
144                     <constructor-arg>
145                         <bean id="handlers" class="org.eclipse.jetty.util.ssl.SslContextFactory">
146
147                             <property name="keyStorePath" value="${activemq.conf}/broker.ks" />
148                             <property name="keyStorePassword" value="password" />
149                         </bean>
150                     </constructor-arg>
151                     <property name="port" value="8162" />
152                 </bean -->
153             </list>
154         </property>
155     </bean>
156
157     <bean id="configureJetty" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
158         <property name="staticMethod" value="org.apache.activemq.web.config.JspConfigurer.configureJetty" />
159         <property name="arguments">
160             <list>
161                 <ref bean="Server" />
162                 <ref bean="secHandlerCollection" />
163             </list>
164         </property>
165     </bean>
166
167     <bean id="invokeStart" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"
168         depends-on="configureJetty, invokeConnectors">
169         <property name="targetObject" ref="Server" />
170         <property name="targetMethod" value="start" />
171     </bean>
172
173
174 </beans>

转载于:https://www.cnblogs.com/xun0523/p/10898115.html

activemq无账户密码登录配置修改相关推荐

  1. SSH无密登录配置(学习笔记3)

    SSH 无密登录配置 在home目录下 ls -al 显示隐藏文件 进入 .ssh 代码执行

  2. 【Hadoop完全分布式】SSH 无密登录配置

    SSH 无密登录配置 1. 配置 ssh 2. 无密钥配置 3. .ssh 文件夹下(~/.ssh)的文件功能解释 1. 配置 ssh (1)基本语法 ssh 另一台电脑的 IP 地址 (2)ssh ...

  3. Linux系统:SSH无密登录配置

    测试环境: Linux系统镜像 : CentOS-7-x86_64-Minimal-1804.iso 虚拟机版本:  VMware-workstation-full-15.5.0-14665864 效 ...

  4. SSH 无密登录配置

    生成公钥和私钥 [root@hadoop101 ~]# ssh-keygen -t rsa 然后敲(三个回车),就会生成两个文件 id_rsa(私钥).id_rsa.pub(公钥 公钥拷贝 将公钥拷贝 ...

  5. 虚拟机免密登录 (SSH 无密登录配置)

    无密钥配置 (1)免密登陆原理 (2)生成公钥和私钥: [root@hadoop101 .ssh]$ ssh-keygen -t rsa 然后敲(三个回车),就会生成两个文件id_rsa(私钥).id ...

  6. ssh无密登录配置详解(hadoop集群搭建)

    ssh无密登录原理 Hadoop集群搭建时,配置ssh是给yarn用的,最好先清空.ssh目录下的文件,再生成密钥,在节点中含有resourcemanager的服务器(有多个resourcemanag ...

  7. 【十四】无验证码登录配置:通过登录接口获取 token 配置全局变量

    目录 一.基本配置 二.用户定义的变量 三.用户参数 四.HTTP 请求默认值 五.HTTP 信息头管理器 六.监听器 七.登录线程组 (1)HTTP 请求:登录接口 (2) 察看结果树 (3)Jso ...

  8. 操作SSH无密登录配置

    例如小编有三台服务器需要相互访问,就需要配置三台,这三台分别是hadoop102, hadoop103 , hadoop104 1.打开三个服务器,分别生成hadoop102,hadoop103 , ...

  9. Hadoop之SSH无密登录配置

    1.hadoop102上生成公钥和私钥: [atguigu@hadoop102 /atguigu]$ ssh-keygen -t rsa 然后敲(三个回车),就会生成两个文件id_rsa(私钥).id ...

最新文章

  1. 【组队学习】【28期】数据采集从入门到精通
  2. AI一分钟|传谷歌正与腾讯等洽谈合作,欲在中国推云服务;国产超算运算速度或达每秒百亿亿次...
  3. 精简linux系统的制作
  4. a卡显存测试软件_官方游戏性能堪比RTX 3080 苏姿丰:RX 6000 Big Navi是史上最强A卡...
  5. mockito mock测试框架
  6. 函数计算搭建 Serverless Web 应用(二)- 自定义域名
  7. LeetCode每日一题:回文数(No.9)
  8. 2017 开源软件排行_2017年面向设计师和艺术家的顶级开源解决方案
  9. Nginx测试实验--rest服务端负载均衡应用
  10. 九、索引与执行计划、索引的分类
  11. Java的String/byte[]/16进制相互转换
  12. 阿里、美团、滴滴产品经理共述:产品经理的“乐”与“伤”
  13. C-Free5.0破解码
  14. 201871010109-胡欢欢《面向对象程序设计(java)》第四周学习总结会
  15. 接口保护ESD防静电二极管选择ESDSRVLC05-4
  16. 小米8Lite刷机教程(大多数手机操作基本通用)
  17. 十进制的Sin函数图像数组
  18. 分享QQ、微信 好友 ,空间、 新浪 的三种方式(验证通过)
  19. ps4手柄usb线连接后可以玩电脑游戏
  20. Java内存溢出场景及解决办法

热门文章

  1. python画三维立体图-python之画三维图像
  2. python下载代码-python下载大文件代码
  3. python多线程爬虫实例-python支持多线程的爬虫实例
  4. python 代码-我整理的Python代码规则
  5. python简单代码input-Python简单程序的练习
  6. 小学生学python-小学生都学Python了,你还不知道如何开始
  7. python爬虫新手项目-给新手推荐几个实用又适合上手的Python爬虫项目
  8. Linux桌面环境与命令行环境切换快捷键,以及linux 图形界面 X Server 关闭 启动
  9. Logon failed, use ctrl+c to cancel basic credential prompt. 错误
  10. 题目1104:整除问题