前置条件
- 64bit OS, Linux/Unix/Mac is recommended;
- 64bit JDK 1.8+;
- Maven 3.2.x;
- Git;
- 4g+ free disk for Broker server
下载安装
#选择安装目录
cd /usr/local
#下载
wget http://mirrors.tuna.tsinghua.edu.cn/apache/rocketmq/4.4.0/rocketmq-all-4.4.0-source-release.zip
#解压
unzip rocketmq-all-4.4.0-source-release.zip
#编译
mvn -Prelease-all -DskipTests clean install -U
cd distribution/target/apache-rocketmq
修改配置
vim conf/broker.conf
vim bin/mqbroker.xml
vim bin/runbroker.sh
Start Name Server
nohup sh bin/mqnamesrv & -n 公网ip:9876
#查看启动日志
tail -f ~/logs/rocketmqlogs/namesrv.log
Start Broker
nohup bin/mqbroker -n 公网IP:9876 -c conf/broker.conf autoCreateTopicEnable=true &
#查看启动日志
tail -f ~/logs/rocketmqlogs/namesrv.log