docker安装Rocketmq

如下:

docker pull rocketmqinc/rocketmq

--创建安装位置目录 mkdir -p /home/xx/tool/server/rocketmq/nameserver/logs /home/xx/tool/server/rocketmq/nameserver/store
docker run -d --restart
=always --name rmqnamesrv --privileged=true -p 9876:9876 \ -v /home/xx/tool/server/rocketmq/nameserver/logs:/root/logs \ -v /home/xx/tool/server/rocketmq/nameserver/store:/root/store \ -e "MAX_POSSIBLE_HEAP=100000000" rocketmqinc/rocketmq sh mqnamesrv
broker.conf文件配置 brokerClusterName
= DefaultCluster brokerName = broker-a brokerId = 0 deleteWhen = 04 fileReservedTime = 48 brokerRole = ASYNC_MASTER flushDiskType = ASYNC_FLUSH brokerIP1 = 主机的IP

docker run -d --restart
=always --name rmqbroker --link rmqnamesrv:namesrv \ -p 10911:10911 -p 10909:10909 --privileged=true \ -v /home/vimtech/tool/server/rocketmq/broker/logs:/root/logs \ -v /home/vimtech/tool/server/rocketmq/broker/store:/root/store \ -v /home/vimtech/tool/server/rocketmq/broker.conf:/opt/docker/rocketmq/broker.conf \ -e "NAMESRV_ADDR=namesrv:9876" -e "MAX_POSSIBLE_HEAP=200000000" rocketmqinc/rocketmq \ sh mqbroker \ -c /opt/docker/rocketmq/broker.conf

docker pull pangliang/rocketmq-console-ng docker run -d --restart
=always --name rmqadmin1 -e "JAVA_OPTS=-Drocketmq.namesrv.addr=主机的IP:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -p 8099:8080 pangliang/rocketmq-console-ng

end

posted @ 2024-03-08 11:28  xh_Blog  阅读(121)  评论(0编辑  收藏  举报