2019独角兽企业重金招聘Python工程师标准>>>

1. 安装JDK并配置环境

环境为CentOS7,需要在CentOS7下安装JDK,并配置环境变量。

2. 下载

http://apache.mirrors.ionfish.org//activemq/5.14.3/apache-activemq-5.14.3-bin.tar.gz

3. 解压安装

## 解压
tar -zxvf apache-activemq-5.14.3-bin.tar.gz## 移动解压后的文件,并从命名文件夹
mv apache-activemq-5.14.3 /opt/apache-activemq## 如果没有脚本执行权限,需要授权
## 如果有权限则不需要授权
cd /opt/apache-activemq
chmod 755 ./activemq

4. 设置防火墙

activemq需要两个端口:

  • 消息通讯端口:61616
  • 管理控制台端口:8161

你可以在activemq目录中的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"/><property name="port" value="8161"/></bean>

打开这两个端口:

## 设置防火墙
firewall-cmd --zone=public --add-port=61616/tcp --permanent
firewall-cmd --zone=public --add-port=8161/tcp --permanent## 重启防火墙
firewall-cmd --reload

5. 启动activemq

可以通过activemq目录下的bin/activemq脚本启动服务,常用的命令有:

  • start:启动
  • stop:停止
  • restart:重启
  • status:查看状态
## 进入脚本所在的目录
cd /opt/apache-activemq/bin## 启动activemq
./activemq start

6. 打开管控台

输入地址:http://192.168.240.131:8161

首次登陆默认密码为:admin/admin

7. 安全配置

根据以上步骤安装完成activemq后,任何连接到activemq的程序都可以创建和消费队列,可以通过修改配置文件conf/activemq.xml来加入身份验证。

在文件的borker标签中加入:

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

重启activemq后,程序连接队列则需要用户名和密码了。

另外,管控台的登录名和密码也可以修改。在conf/jetty.xml中,找到:

<bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint"> <property name="name" value="BASIC" /> <property name="roles" value="admin" /> <property name="authenticate" value="true" />
</bean> 

确保authenticate的值是true,默认安装完成就是true了。

登陆管控台的帐号和密码在conf/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

你可以在最下面添加、修改或删除登陆管控台的用户名和密码,格式为:

用户名: 密码, [角色, 角色, 角色 ...]

修改完成后,重启activemq服务生效。

转载于:https://my.oschina.net/u/2450666/blog/833980

ActiveMQ — 单节点 — 安装与配置相关推荐

  1. Hadoop介绍及最新稳定版Hadoop 2.4.1下载地址及单节点安装

     Hadoop介绍 Hadoop是一个能对大量数据进行分布式处理的软件框架.其基本的组成包括hdfs分布式文件系统和可以运行在hdfs文件系统上的MapReduce编程模型,以及基于hdfs和MapR ...

  2. 大数据单机学习环境搭建(9)Spark单节点安装与pyspark使用

    包含sparksql的完整使用案例,请务必耐心看完 专题:大数据单机学习环境搭建和使用 1.Spark安装 2.Spark配置 2.1配置环境变量 2.2spark客户端 3.Spark使用 3.1环 ...

  3. Docker安装zookeeper 单节点安装

    基于Docker安装zookeeper 一.单节点安装 拉取最新版本 docker pull zookeeper 启动zookeeper并添加映射 语法:docker run --privileged ...

  4. Apache Hadoop 2.4.1 单节点安装

    2019独角兽企业重金招聘Python工程师标准>>> 一.目的 这篇文档描述了怎样去安装和配置一个单节点的Hadoop,因此您可以使用Hadoop MapReduce 和 Hado ...

  5. ceph单节点安装部署

    目录 背景 第一步.创建虚拟机 第二步.启动虚拟机 第三步.更新源 第四步.修改hosts 第五步,关闭selinux 第六步,安装软件 第七步,开始部署 第八步,部署其他服务 背景 在学习Ceph基 ...

  6. Hbase单节点安装

    zookeeper单节点部署 实验环境 操作系统:Ubuntu 16.04 Hadoop:Hadoop 2.7.5 Zookeeper:zookeeper 3.4.12 Java:java versi ...

  7. 【大数据系列】hadoop单节点安装官方文档翻译

    Hadoop: Setting up a Single Node Cluster. HADOOP:建立单节点集群 Purpose Prerequisites Supported Platforms R ...

  8. gaussDB200 单节点安装

    ** ## 安装环境 redhat7.1 ** 一.安装前准备: 1.软件包: FusionInsight_Manager_6.5.1_RHEL.tar.gz FusionInsight_BASE_6 ...

  9. Devstack单节点环境实战配置

    本文为minxihou的翻译文章,转载请注明出处Bob Hou: http://blog.csdn.net/minxihou JmilkFan:minxihou的技术博文方向是 算法&Open ...

最新文章

  1. 「SAP技术」SAP MM 采购信息记录新价格不能体现在采购订单新的ITEM上?
  2. 8月份Github上最热门的Python开源项目
  3. ITK:对多个线程上的数据进行操作以利用多核处理器
  4. python绘制神经网络(转载)
  5. JAVA方法 字符串与unicode的相互转换
  6. mysql中文乱码 go_Mysql binlog乱码问题研究-Go语言中文社区
  7. 不要在循环,条件或嵌套函数中调用 Hook
  8. L2-010 排座位 (并查集)
  9. centOs7 虚拟机设置文件共享
  10. 跨平台日志清理工具 Log-Cutter v2.0.1 RC-1 发布
  11. 【个人想法】个人关于数据库字段类型选择的想法
  12. Linux中网卡的命名规则
  13. 深度学习中的9种归一化方法概述
  14. cs61A homework4
  15. uniapp——点击图片放大预览
  16. handsontable+vue+ 自定义多选
  17. matlab命令 elempro,装好MATLAB后,The markup in the document preceding the root elem
  18. cosx的傅里叶变换
  19. java递归获取树结构的指定层级、指定层级之上(向上递归(包含父集所有、爷爷集所有...)(父集单独、爷爷集单独...))、指定层级之下所有的(子集、孙子集...)和list集合转Tree树结构
  20. 报表工具轻松搞定卡片式报表

热门文章

  1. 测试机房质量之上传下载速率测试
  2. Linux LVM 的使用详解
  3. DB2 XQuery学习笔记
  4. ubuntu14.04系统扩容的方法
  5. 打包的时候不把配置文件加进去_webpack区分developement和production打包
  6. java中json重复数据结构_怎么将有JSON中有相同值放在一组?
  7. 错误: 至少有一个需要的隐性或转发依赖函数没找到。_实现一个自己的 Compile...
  8. win7无法连接打印机拒绝访问_win7系统连接XP网络打印机无法连接到打印机拒绝访问的解决方法...
  9. php 去掉img,php怎样去掉img标签
  10. C语言----求解N以内的素数的两种典型方法以及其优化