在 linux 系统上安装 activemq的记录。目前activemq 的最新版本是“5.14.5”
在系统上下载 activemq 的安装包
wget http://archive.apache.org/dist/activemq/5.14.5/apache-activemq-5.14.5-bin.tar.gz
下载完成后解压缩
tar zxvf activemq-5.14.5-bin.tar.gz
启动 activemq
cd [activemq_install_dir]/bin
./activemq console
登录管理页面 http://ip:8161/admin
修改配置文件,设置登录名,密码。
# conf 文件夹下credentials.properties
# Defines credentials that will be used by components (like web console) to access the broker
activemq.username=system
activemq.password=1111111
guest.password=password
配置web客户端的用户名和密码:
# conf目录下 jetty-realm.properties 文件
# username: password [,rolename ...]
admin: xxx1234, admin
user: user, user
使用 activemq
添加 maven 依赖
<!-- https://mvnrepository.com/artifact/org.apache.activemq/activemq-all -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.14.5</version>
</dependency>