进去官网下载
https://activemq.apache.org/components/classic/download/
选择linux版本,需要注意选择java版本
![](https://i0.wp.com/www.liuchang.org/wp-content/uploads/2022/04/1111.png?resize=1024%2C197&ssl=1)
下载完成后解压:
tar -zxvf apache-activemq-5.16.4-bin.tar.gz
进入conf目录配置控制台ip及端口:
cd conf
vim jetty.xml
![](https://i0.wp.com/www.liuchang.org/wp-content/uploads/2022/04/1111-1.png?resize=1024%2C136&ssl=1)
控制台默认用户名密码都为admin
可在jetty-realm.properties中修改
vim jetty-realm.properties
格式为:用户名:密码, 角色
![](https://i0.wp.com/www.liuchang.org/wp-content/uploads/2022/04/1111-2.png?resize=508%2C81&ssl=1)
修改完成后,进入bin目录启动
./activemq start
停止:
./activemq stop
如果要自定义日志输出文件:
./activemq start > ./log/run.log
查看修改队列的默认端口:
vim ./conf/activemq.xml
![](https://i0.wp.com/www.liuchang.org/wp-content/uploads/2022/04/1111-3.png?resize=1024%2C166&ssl=1)