杨梅冲
每天在想什么呢?

官网:https://activemq.apache.org/index.html

下载最新:https://activemq.apache.org/components/classic/download/

下载老版本:https://activemq.apache.org/components/classic/documentation/download-archives

tar -xzvf apache-activemq-5.15.14-bin.tar.gz
mv apache-activemq-5.15.14-bin activemq
cd activemq/bin

# 启动失败查看错误使用
./activemq console
# 启动
./activemq start
# 带日志的启动
./activemq start > logs/activestart.log

linux启动报错

# activemq/data/activemq.log
2024-06-26 17:55:11,498 | ERROR | Failed to start Apache ActiveMQ (localhost, ID:server_test-38193-1719395711115-0:1) | org.apache.activemq.broker.BrokerService | main
java.net.URISyntaxException: Illegal character in hostname at index 11: ws://server_test:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600

# 解决方法:
# 这个不是端口占用问题,将配置文件中0.0.0.0的ip改为127.0.0.1 就可以重新启动解决
vim activemq/conf/activemq.xml
<transportConnector name="openwire" uri="tcp://127.0.0.1:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="amqp" uri="amqp://127.0.0.1:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="stomp" uri="stomp://127.0.0.1:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="mqtt" uri="mqtt://127.0.0.1:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="ws" uri="ws://127.0.0.1:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>

登陆后台:http://192.168.10.10:8161/ ,默认账号密码:admin/admin

如果需要修改默认密码conf/jetty-realm.properties:

# Defines users that can access the web (console, demo, etc.)
# username: password [,rolename ...]
admin: 123456, admin
user: 123456, user

Jms连接MQ需要的帐号密码: 

默认帐号:system

默认密码:manager

cat conf/credentials.properties
activemq.username=system
activemq.password=manager

 

posted on 2024-06-26 19:01  杨梅冲  阅读(4)  评论(0编辑  收藏  举报