CentOS7.3安装rocketmq

安装环境

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

安装

编译克隆

 
      
1
2
3
4
 
      
[root@paascloud-rocketmq-001 local]# git clone -b develop https://github.com/apache/incubator-rocketmq.git
[root@paascloud-rocketmq-001 local]# cd incubator-rocketmq
[root@paascloud-rocketmq-001 local]# mvn -Prelease-all -DskipTests clean install -U
[root@paascloud-rocketmq-001 local]# cd distribution/target/apache-rocketmq

构建速度较慢 最好自己搭建一个nexus, 感兴趣的参考博客

配置jvm内存

 
      
1
2
3
4
 
      
[root@paascloud-rocketmq-001 incubator-rocketmq]# cd distribution/target/apache-rocketmq
JAVA_OPT="${JAVA_OPT} -server -Xms1g -Xmx1g -Xmn512m -XX:PermSize=128m -XX:MaxPermSize=320m"
[root@paascloud-rocketmq-001 apache-rocketmq]# vim bin/runbroker.sh
JAVA_OPT="${JAVA_OPT} -server -Xms1g -Xmx1g -Xmn512m"

配置启动mqnamesrv

 
      
1
2
3
4
5
 
      
[root@paascloud-rocketmq-001 apache-rocketmq]# nohup sh /usr/local/incubator-rocketmq/distribution/target/apache-rocketmq/bin/mqnamesrv &
[1] 2476
[root@paascloud-rocketmq-001 apache-rocketmq]# nohup: 忽略输入并把输出追加到"nohup.out"
[root@paascloud-rocketmq-001 apache-rocketmq]# tail -f /usr/local/incubator-rocketmq/distribution/target/apache-rocketmq/logs/rocketmqlogs/namesrv.log
NettyEventExecutor service started

配置启动broker

 
      
1
2
3
4
5
 
      
[root@paascloud-rocketmq-001 apache-rocketmq]# vi /usr/local/incubator-rocketmq/distribution/target/apache-rocketmq/conf/broker.conf
增加: brokerIP1=192.168.141.21
[root@paascloud-rocketmq-001 apache-rocketmq]# nohup sh /usr/local/incubator-rocketmq/distribution/target/apache-rocketmq/bin/mqbroker -n localhost:9876 -c /usr/local/incubator-rocketmq/distribution/target/apache-rocketmq/conf/broker.conf &
[root@paascloud-rocketmq-001 apache-rocketmq]# tail -f ~/logs/rocketmqlogs/broker.log
BrokerControllerScheduledThread1 - register broker to name server localhost:9876 OK

关闭服务器

 
      
1
2
 
      
# sh bin/mqshutdown broker
# sh bin/mqshutdown namesrv

配置windows控制台github

rocketmq-console 文件夹为普通jar项目的控制台, 也是我选择的版本(自行打包编译)

####创建bat启动文件

 
      
1
2
3
 
      
@echo off
java -jar rocketmq-console-ng-1.0.0.jar --server.port=12581 --rocketmq.config.namesrvAddr=192.168.241.21:9876
@pause

最后启动成功
rocketMq官网
官方安装手册

你可能感兴趣的:(CentOS7.3安装rocketmq)