centos7 单节点master rocketmq

Posted 莫大人

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos7 单节点master rocketmq相关的知识,希望对你有一定的参考价值。

参考:

http://rocketmq.apache.org/docs/quick-start/

 

1.环境
64bit OS, Linux/Unix/Mac is recommended;
64bit JDK 1.8+;
Maven 3.2.x
Git

2.下载代码 /apps/installFile

cd /apps/installFile 
git clone -b develop https://github.com/apache/incubator-rocketmq.git
cd incubator-rocketmq
mvn -Prelease-all -DskipTests clean install -U
cd distribution/target/apache-rocketmq

 

3.Start Name Server

cd /apps/installFile/incubator-rocketmq/distribution/target/apache-rocketmq/
nohup sh bin/mqnamesrv &
tail -f ~/logs/rocketmqlogs/namesrv.log

 

 

4.配置 JAVA_OPT,我的虚拟机配置了 4G内存

cd /apps/installFile/incubator-rocketmq/distribution/target/apache-rocketmq/bin

配置 vi  runserver.sh ,

JAVA_OPT="${JAVA_OPT} -server -Xms1g -Xmx1g -Xmn512m -XX:PermSize=128m -XX:MaxPermSize=320m"

 

 

配置 vi runbroker.sh

JAVA_OPT="${JAVA_OPT} -server -Xms2g -Xmx2g -Xmn1g"

 

 

5.Start Broker

cd /apps/installFile/incubator-rocketmq/distribution/target/apache-rocketmq/
nohup sh bin/mqbroker -n localhost:9876 &
tail -f ~/logs/rocketmqlogs/broker.log

 

 

6.测试

生产消息

cd /apps/installFile/incubator-rocketmq/distribution/target/apache-rocketmq
export NAMESRV_ADDR=localhost:9876
sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer

消费

sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer

 

以上是关于centos7 单节点master rocketmq的主要内容,如果未能解决你的问题,请参考以下文章

centos7下部署elasticSearch集群

centos7.6 安装k8s单节点与kuboard

K8S——单master节点和基于单master节点的双master节点二进制部署

K8S——单master节点和基于单master节点的双master节点二进制部署(本机实验,防止卡顿,所以多master就不做3台了)

K8S——单master节点和基于单master节点的双master节点二进制部署(本机实验,防止卡顿,所以多master就不做3台了)

k8s单master集群部署