本地虚拟机搭建rocketmq和阿里云搭建rocketmq

rocketmq版本:rocketmq-all-4.5.1-bin-release.zip

1.本地虚拟机搭建rocketmq操作步骤

cd /usr/local/rocketmq-all-4.5.1-bin-release

1.1 vim bin/runserver.sh :修改jvm启动参数

JAVA_OPT="${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn125m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"

1.2 vim bin/runbroker.sh

JAVA_OPT="${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn128m"

1.3 vim conf/broker.conf 

brokerIP1=192.168.25.113
namesrvAddr=192.168.25.113:9876

1.4
注意修改
vim bin/tools.sh
============
JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${BASE_DIR}/lib:${JAVA_HOME}/jre/lib/ext:/usr/java/jdk1.8.0_131/jre/lib/ext"
======================

vim /etc/profile
==========
export ROCKETMQ_HOME=/usr/local/rocketmq-all-4.5.1-bin-release
export PATH=$ROCKETMQ_HOME/bin:$PATH
export NAMESRV_ADDR=192.168.25.113:9876
=================
source /etc/profile


nohup ./bin/mqnamesrv -n 192.168.25.113:9876 &
nohup sh bin/mqbroker -n 192.168.25.113:9876 -c conf/broker.conf &
lsof -i:9876,10909,10911
./bin/mqadmin updateTopic -n localhost:9876 -b localhost:10911 -t ApplyInfo


docker pull styletang/rocketmq-console-ng:1.0.0
docker run -e "JAVA_OPTS=-Drocketmq.namesrv.addr=192.168.25.111:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -p 8083:8080 -t styletang/rocketmq-console-ng:1.0.0

nohup java -jar rocketmq-console-ng-1.0.1.jar --server.port=8082 --rocketmq.config.namesrvAddr=192.168.25.111:9876 &

===================阿里云搭建rocketmq=========================


vim runbroker.sh

vim runserver.sh

 vim broker.conf  (这里要注意是用阿里云公网ip)
=======================
brokerIP1=47.100.87.218
brokerIP2=47.100.87.218
======================

注意修改
vim bin/tools.sh
============
JAVA_OPT="${JAVA_OPT} -Djava.ext.dirs=${BASE_DIR}/lib:${JAVA_HOME}/jre/lib/ext:/usr/java/jdk1.8.0_131/jre/lib/ext"
======================

vim /etc/profile
==========
export ROCKETMQ_HOME=/usr/local/rocketmq-all-4.5.1-bin-release
export PATH=$ROCKETMQ_HOME/bin:$PATH
export NAMESRV_ADDR=你的阿里云服务器公网IP:9876
=================
source /etc/profile

================阿里云执行命令====================
nohup sh bin/mqnamesrv  &
nohup sh bin/mqbroker -n localhost:9876 -c conf/broker.conf autoCreateTopicEnable=true &
lsof -i:9876,10909,10911
./bin/mqadmin updateTopic -n localhost:9876 -b localhost:10911 -t ApplyInfo


docker pull styletang/rocketmq-console-ng:1.0.0
docker run -e "JAVA_OPTS=-Drocketmq.namesrv.addr=192.168.25.113:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -p 8083:8080 -t styletang/rocketmq-console-ng:1.0.0


nohup java -jar rocketmq-console-ng-1.0.1.jar --server.port=8082 --rocketmq.config.namesrvAddr=阿里云私有IP:9876 &

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值