本地虚拟机搭建rocketmq和阿里云搭建rocketmq
rocketmq版本:rocketmq-all-4.5.1-bin-release.zip1.本地虚拟机搭建rocketmq操作步骤cd /usr/local/rocketmq-all-4.5.1-bin-release1.1 vim bin/runserver.sh :修改jvm启动参数JAVA_OPT="${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn125
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 &
更多推荐
所有评论(0)