Mac 本地搭建 activemq 单机服务

安装 activemq 服务

## 通过 brew 安装 activemq
brew search activemq
brew install activemq

## 查看 redis 信息
brew info activemq

启动 activemq 服务,查看状态和进程信息

## 启动 activemq 服务,并设置开机自启
brew services start activemq
## 启动 redis 服务,不设置开机自启
activemq start

关闭 activemq 服务

## 下面这条命令不生效,暂不知原因
brew services stop activemq

## 关闭 activemq 服务
activemq stop

activemq 配置文件地址

## 5.15.5 版本号根据本机安装情况确定
/usr/local/Cellar/activemq/5.15.5/libexec/conf/activemq.xml

activemq admin 管控台

activemq admin 管控台使用 jetty 部署

## 5.15.5 版本号根据本机安装情况确定
应用路径: /usr/local/Cellar/activemq/5.15.5/libexec/webapps
网址: http://127.0.0.1:8161/admin/
用户名: admin
密码: admin

端口配置文件: /usr/local/Cellar/activemq/5.15.5/libexec/conf/jetty.xml
账户配置文件: /usr/local/Cellar/activemq/5.15.5/libexec/conf/jetty-realm.properties

activemq 安全机制

## 在 activemq 的配置文件 
## /usr/local/Cellar/activemq/5.15.5/libexec/conf/activemq.xml 
## 的节点 <broker></broker> 中添加如下内容

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