记忆角落

  • {{ item.name }}
  • CentOS安装activeMQ
  • tar方式安装
  • 1.下载
  • 2.解压,启动,测试
  • 3.activemq 无法访问web页面问题
  • 4.修改web页面的默认账号密码
  • docker方式
  • 1.搜索 ActiveMQ 镜像
  • 2.获取 ActiveMQ 镜像
  • 3.docker 启动 ActiveMQ 命令
  • 首页
  • 关于
  • 归档
  • 邻居
  • 捐赠

CentOS安装activeMQ

  • 郭良俊只狗
  • 2021-12-02
  • 0

CentOS安装activeMQ

tar方式安装

1.下载

http://archive.apache.org/dist/activemq/ 选择对应版本下载即可

这次安装的是apache-activemq-5.16.3

2.解压,启动,测试

tar -zxvf apache-activemq-5.16.3-bin.tar.gz
cd apache-activemq-5.16.3
cd bin
./activemq start

ps -ef | grep activemq
netstat -anp|grep 61616
netstat -anp|grep 8161 # 这是web使用端口

3.activemq 无法访问web页面问题

修改/usr/local/apache-activemq-5.16.3/conf/jetty.xml文件

将默认jetty.xml 127.0.0.1,改成您部署服务器的ip即可

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

最后验证结果输入http://ip地址:8161/admin 用户名:admin 密码:admin

如我的:http://192.168.31.101:8161/admin/

image-20211202132243532

4.修改web页面的默认账号密码

关闭activeMQ:/usr/local/apache-activemq-5.16.3/bin/activemq stop

修改/usr/local/apache-activemq-5.16.3/conf/jetty-realm.properties文件

[root@gzbsc001 conf]# cat jetty-realm.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 users that can access the web (console, demo, etc.)
# username: password [,rolename ...]
admin: admin, admin

将上面的admin密码修改成您的密码即可

再次开启activeMQ:/usr/local/apache-activemq-5.16.3/bin/activemq start

docker方式

1.搜索 ActiveMQ 镜像

docker search activemq

2.获取 ActiveMQ 镜像

docker pull webcenter/activemq:5.14.3

3.docker 启动 ActiveMQ 命令

docker run --name='activemq' -d \
-e 'ACTIVEMQ_ADMIN_LOGIN=admin' -e 'ACTIVEMQ_ADMIN_PASSWORD=Jtcmcc@139.com' \
-v /data/activemq:/data \
-v /var/log/activemq:/var/log/activemq \
-p 8161:8161 \
-p 61616:61616 \
-p 61613:61613 \
webcenter/activemq:5.14.3
© 2012 - 2023 记忆角落 网站统计
Theme by Wing
粤ICP备14056850号-1 又拍云CDN赞助