docker run方式部署RocketMQ 5.1单机版
docker 安装rocketMQ 5.1
一、docker环境自行安装
二、RocketMQrocketMQ 5.1单机版
mkdir -p /data/rocketmq/data/namesrv/logs /data/rocketmq/data/broker/logs /data/rocketmq/data/broker/store /data/rocketmq/conf
chmod -R 777 /data/rocketmq #必须
1、namesrv安装
docker run -d \
--restart=always \
--name rmqnamesrv \
-p 9876:9876 \
-v /data/rocketmq/data/namesrv/logs:/home/rocketmq/logs/rocketmqlogs \
-e "MAX_POSSIBLE_HEAP=100000000" \
apache/rocketmq:5.1.0 \
sh mqnamesrv
2、borker安装
docker run -d \
--restart=always \
--name rmqbroker \
--link rmqnamesrv:namesrv \
-p 10911:10911 \
-p 10909:10909 \
-v /data/rocketmq/data/broker/logs:/home/rocketmq/logs/rocketmqlogs \
-v /data/rocketmq/data/broker/store:/home/rocketmq/store \
-v /data/rocketmq/conf/broker.conf:/home/rocketmq/rocketmq-5.1.0/conf/broker.conf \
-e "NAMESRV_ADDR=namesrv:9876" \
-e "MAX_POSSIBLE_HEAP=200000000" \
apache/rocketmq:5.1.0 \
sh mqbroker -c /home/rocketmq/rocketmq-5.1.0/conf/broker.conf
cat broker.conf
brokerClusterName = test
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
brokerIP1 = 10.0.102.43
autoCreateTopicEnable=true
autoCreateSubscriptionGroup=true
diskMaxUsedSpaceRatio=88
3、rocketmq控制台安装
docker run -d \
--restart=always \
--name rocketmq-admin \
-e "JAVA_OPTS=-Drocketmq.namesrv.addr=10.0.102.43:9876 \
-Dcom.rocketmq.sendMessageWithVIPChannel=false" \
-p 9090:8080 \
apacherocketmq/rocketmq-dashboard:latest
更多推荐
所有评论(0)