中间件-RocketMQ 02 Docker下的安装

1,安装server节点

docker run -d -p 9876:9876 --name rmqserver  foxiswho/rocketmq:server

2,安装broker节点

(1)新建节点
docker run -d -p 10911:10911 -p 10909:10909 --name rmqbroker --link rmqserver:namesrv -e "NAMESRV_ADDR=namesrv:9876" -e "JAVA_OPTS=-Duser.home=/opt"  -e "JAVA_OPT_EXT=-server -Xms128m -Xmx128m -Xmn128m" foxiswho/rocketmq:broker
(2)将配置文件复制出来
docker cp rmqbroker:/etc/rocketmq/broker.conf /neusoft/docker/rocketmq/conf/broker.conf
(3)删除broker节点
docker stop rmqbroker

docker rm rmqbroker
docker run -d -p 10911:10911 -p 10909:10909 --name rmqbroker --link rmqserver:namesrv -e "NAMESRV_ADDR=namesrv:9876" -e "JAVA_OPTS=-Duser.home=/opt"  -e "JAVA_OPT_EXT=-server -Xms128m -Xmx128m -Xmn128m" -v /neusoft/docker/rocketmq/conf:/etc/rocketmq foxiswho/rocketmq:broker

3,安装监控
docker run --name rmqconsole -p 8180:8080 --link rmqserver:namesrv -e "JAVA_OPTS=-Drocketmq.namesrv.addr=namesrv:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -t styletang/rocketmq-console-ng

posted on 2020-05-13 16:29  bodaaa  阅读(179)  评论(0编辑  收藏  举报

导航