docker安装下RocketMQ(以配置文件的方式启动)
下面简单说下Docker安装RocketMQ(Linux系统下) 1.创建文件夹 cd /usr/local/rmq cd rmq/
mkdir conf
cd conf/
vim broker.conf 配置文件部分如下 brokerClusterName = DefaultCluster brokerName = broker-a brokerId = 0 deleteWhen = 04 fileReservedTime = 48 brokerRole = ASYNC_MASTER flushDiskType = ASYNC_FLUSH brokerIP1 = 外网IP地址
---------------------------------------------------手动分割线------------------------------------------------------------------- 1.首先安装启动namesrv服务
docker pull rocketmqinc/rocketmq:4.4.0
docker run -d -p 19876:9876-v /usr/local/rmq/data/namesrv/logs:/root/logs -v
/usr/local/rmq/data/namesrv/store:/root/store --name rmqnamesrv -e"MAX_POSSIBLE_HEAP=50000000"
rocketmqinc/rocketmq:4.4.0 sh mqnamesrv
2.启动broker服务
docker run -d -p 10911:10911 -p 10909:10909 -v
/usr/local/rmq/data/broker/logs:/root/logs -v
/usr/local/rmq/rocketmq/data/broker/store:/root/store -v
/usr/local/rmq/conf/broker.conf:/opt/rocketmq/conf/broker.conf --name rmqbroker
--link rmqnamesrv:namesrv -e "NAMESRV_ADDR=namesrv:19876"
-e "MAX_POSSIBLE_HEAP=100000000" -e "JAVA_OPT_EXT=-server -Xms1G -Xmx1G"
rocketmqinc/rocketmq:4.4.0 sh mqbroker
3.装一个图形化界面
docker pull styletang/rocketmq-console-ng
docker run -e"JAVA_OPTS=-Drocketmq.config.namesrvAddr={docker宿主机ip}:19876
-Drocketmq.config.isVIPChannel=false"-p8080:8080-t styletang/rocketmq-console-ng
可以了仅供参考(有问题再改吧断句的地方全都有空格记得别忘记了)