一、部署namesrv:
docker run --rm -p 9876:9876 -itd rocketmq:1.0
然后内部启动 nohup sh bin/mqnamesrv &
二、部署brokers:
部署broker0:docker run --rm -p 10911:10911 10909:10909 40911:40911 -itd rocketmq:1.0
修改broker的conf样例conf/dledger/xxx-n0.conf:
brokerIP1=188.53.22.66
brokerClusterName = RaftCluster
brokerName=RaftNode00
listenPort=10911
namesrvAddr=188.53.22.66:9876
storePathRootDir=/tmp/rmqstore/node00
storePathCommitLog=/tmp/rmqstore/node00/commitlog
enableDLegerCommitLog=true
dLegerGroup=RaftNode00
dLegerPeers=n0-188.53.22.66:40911;n1-188.53.22.66:40912;n2-188.53.22.66:40913
## must be unique
dLegerSelfId=n0
sendMessageThreadPoolNums=2
然后内部启动:
nohup sh bin/mqbroker -c conf/dledger/xxx-n0.conf &
部署broker1:docker run --rm -p 20911:20911 -p 20909:20909 -p 40912:40912-itd rocketmq:1.0
修改broker的conf样例conf/dledger/xxx-n1.conf:
brokerIP1=188.53.22.66
brokerClusterName = RaftCluster
brokerName=RaftNode00
listenPort=20911
namesrvAddr=188.53.22.66:9876
storePathRootDir=/tmp/rmqstore/node00
storePathCommitLog=/tmp/rmqstore/node00/commitlog
enableDLegerCommitLog=true
dLegerGroup=RaftNode00
dLegerPeers=n0-188.53.22.66:40911;n1-188.53.22.66:40912;n2-188.53.22.66:40913
## must be unique
dLegerSelfId=n1
sendMessageThreadPoolNums=2
然后内部启动:
nohup sh bin/mqbroker -c conf/dledger/xxx-n1.conf &
部署broker2:docker run --rm -p 30911:30911 -p 30909:30909 -p 40913:40913 -itd rocketmq:1.0
修改broker的conf样例conf/dledger/xxx-n2.conf:
brokerIP1=188.53.22.66
brokerClusterName = RaftCluster
brokerName=RaftNode00
listenPort=30911
namesrvAddr=188.53.22.66:9876
storePathRootDir=/tmp/rmqstore/node00
storePathCommitLog=/tmp/rmqstore/node00/commitlog
enableDLegerCommitLog=true
dLegerGroup=RaftNode00
dLegerPeers=n0-188.53.22.66:40911;n1-188.53.22.66:40912;n2-188.53.22.66:40913
## must be unique
dLegerSelfId=n2
sendMessageThreadPoolNums=2
然后内部启动:
nohup sh bin/mqbroker -c conf/dledger/xxx-n2.conf &
四、部署rocketm的dashboard:docker run -d --rm --name rocketmq-dashboard3 -e "JAVA_OPTS=-Drocketmq.namesrv.addr=188.53.22.66:9876" -p 8082:8080 -t apacherocketmq/rocketmq-dashboard:latest
效果图:GitHub 官方url:
https://github.com/apache/rocketmq/blob/master/docs/cn/dledger/deploy_guide.md
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)