Docker系列之Apache RocketMQ安装教程

举报
yd_273762914 发表于 2021/04/09 00:25:09 2021/04/09
【摘要】 Docker系列之Apache RocketMQ安装教程 64bit JDK 1.8Docker version 1.13.1 1、查找安装rocketmq [root@localhost ~]# docker search rocketmq INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED docker.io ...

Docker系列之Apache RocketMQ安装教程

  • 64bit JDK 1.8
  • Docker version 1.13.1

1、查找安装rocketmq

[root@localhost ~]# docker search rocketmq
INDEX NAME DESCRIPTION STARS OFFICIAL   AUTOMATED
docker.io   docker.io/rocketmqinc/rocketmq Image repository for Apache RocketMQ 46 docker.io   docker.io/foxiswho/rocketmq rocketmq 40 docker.io   docker.io/styletang/rocketmq-console-ng rocketmq-console-ng 33 ... 
  
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

选取start最多的rocketinc

docker pull rocketmqinc/rocketmq


  
 
  • 1
  • 2

2、启动rocketmq mqnamesrv

docker run -d -p 9876:9876 -v /root/rocketmq/data/namesrv/logs:/root/logs -v /root/rocketmq/data/namesrv/store:/root/store --name rmqnamesrv -e "MAX_POSSIBLE_HEAP=100000000" rocketmqinc/rocketmq sh mqnamesrv

  
 
  • 1
[root@localhost conf]# docker run -d -p 9876:9876 -v /root/rocketmq/data/namesrv/logs:/root/logs -v /root/rocketmq/data/namesrv/store:/root/store --name rmqnamesrv -e "MAX_POSSIBLE_HEAP=100000000" rocketmqinc/rocketmq sh mqnamesrv
2c168155664fbd046bbac17dba9bae01e9a9bd856b73cd75f14c16c18c2da67b
[root@localhost conf]# docker start rmqnamesrv
rmqnamesrv
[root@localhost conf]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2c168155664f rocketmqinc/rocketmq   "sh mqnamesrv" 20 seconds ago Up 17 seconds 10909/tcp, 0.0.0.0:9876->9876/tcp, 10911/tcp   rmqnamesrv

  
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

3、启动rocketmq broker

[root@localhost ~]# cd /root/rocketmq/conf
[root@localhost conf]# touch broker.conf
[root@localhost conf]# vi broker.conf

  
 
  • 1
  • 2
  • 3
brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
brokerIP1 = 192.168.7.159

  
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

启动broker

docker run -d -p 10911:10911 -p 10909:10909 -v  /root/rocketmq/data/broker/logs:/root/logs -v  /root/rocketmq/data/broker/store:/root/store -v  /root/rocketmq/conf/broker.conf:/opt/rocketmq/conf/broker.conf --name rmqbroker -e "NAMESRV_ADDR=namesrv:9876" -e "MAX_POSSIBLE_HEAP=200000000" rocketmqinc/rocketmq sh mqbroker -c /opt/rocketmq/conf/broker.conf

  
 
  • 1
docker start rmqbroker

  
 
  • 1

4、启动rmqconsole

docker search rocketmq-console


  
 
  • 1
  • 2
docker pull styletang/rocketmq-console-ng 
  
 
  • 1
  • 2
docker run -d --name rmqconsole -p 9800:8080 -e "JAVA_OPTS=-Drocketmq.namesrv.addr=namesrv:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -t styletang/rocketmq-console-ng

  
 
  • 1

在这里插入图片描述

文章来源: smilenicky.blog.csdn.net,作者:smileNicky,版权归原作者所有,如需转载,请联系作者。

原文链接:smilenicky.blog.csdn.net/article/details/114964745

【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。