- 下载RocketMQ的文件
https://rocketmq.apache.org/dowloading/releases/
选择 Binary: rocketmq-all-4.9.3-bin-release.zip
2.环境配置(可不配置,方便启动)
打开终端进入到根目录,命令: cd
编辑.bash_profile文件,命令: vim .bash_profile
把下面代码复制进去,记得把 rocketmq目录地址 修改为你下载的rocketmq目录
如: export ROCKETMQ_HOME=/Users/xxx/software/rocketmq-4.9.3
配置完成之后需重新加载配置文件 命令: source .bash_profile
export ROCKETMQ_HOME=rocketmq目录地址
export PATH=$PATH:$ROCKETMQ_HOME/bin
3 启动路由(配置第二步可忽略:cd到rocketmq-all-4.9.3-bin-release/bin目录)
nohup sh mqnamesrv & 启动
tail -f ~/logs/rocketmqlogs/namesrv.log // 查看namaserver日志
#显示以下内容代表启动成功
INFO main - The Name Server boot success
- 启动broker(配置第二步可忽略:cd到rocketmq-all-4.9.3-bin-release/bin目录)
//启动
nohup sh mqbroker -n localhost:9876 &
nohup sh mqbroker -n 192.168.1.63:9876 -c ../conf/broker.conf autoCreateTopicEnable=true &
// 查看broker日志
tail -f ~/logs/rocketmqlogs/broker.log
// 启动成功
The broker[TF012778.local, 10.50.62.53:10911] boot success
5.关闭rocketmq
//停止 broker
sh mqshutdown broker
//停止 nameserver
sh mqshutdown namesrv
参考:
https://zhaohongye.com/rocketmq-dashboard/
https://blog.csdn.net/qq_29285873/article/details/123567264
https://juejin.cn/post/6989542586050412580
https://blog.csdn.net/apple_csdn/article/details/125277508
网友评论