当前位置:   article > 正文

【Mac catalina安装RocketMQ4.3.2】_mac rocketmq4.3

mac rocketmq4.3

移动至devEnv目录

cd Downloads
mv rocketmq-all-4.3.2-bin-release.zip ../devEnv
  • 1
  • 2

解压并修改目录名

cd ../devEnv 
unzip rocketmq-all-4.3.2-bin-release.zip
mv rocketmq-all-4.3.2-bin-release rocketmq-4.3.2
  • 1
  • 2
  • 3

修改启动参数(修改为512m 512m 256m)

cd rocketmq-4.3.2
cd bin
vi runbroker.sh
vi runserver.sh 
  • 1
  • 2
  • 3
  • 4

创建log文件夹

cd ../
mkdir logs
cd logs
touch namesrv.log
touch broker.log
  • 1
  • 2
  • 3
  • 4
  • 5

允许文件夹的读写权限

cd ../../
chmod -R u+x rocketmq-4.3.2
  • 1
  • 2

mac终端配置.zshrc环境变量(ROCKETMQ_HOME修改为自己实际路径)

cd  ~
vi .zshrc
#RocketMQ环境配置
export ROCKETMQ_HOME=/Users/mxz/devEnv/rocketmq-4.3.2
export PATH=${ROCKETMQ_HOME}/bin:$PATH
  • 1
  • 2
  • 3
  • 4
  • 5

创建启动别名,启动/停止RocketMQ的namesrv和broker

alias startRocketMQNamesrv='nohup ${ROCKETMQ_HOME}/bin/mqnamesrv > ${ROCKETMQ_HOME}/logs/namesrv.log &'
alias startRocketMQBroker='nohup ${ROCKETMQ_HOME}/bin/mqbroker -n localhost:9876 > ${ROCKETMQ_HOME}/logs/broker.log &'
alias stopRocketMQNamesrv='sh ${ROCKETMQ_HOME}/bin/mqshutdown namesrv'
alias stopRocketMQBroker='sh ${ROCKETMQ_HOME}/bin/mqshutdown broker'
  • 1
  • 2
  • 3
  • 4

创建消息Topic

cd /Users/mxz/devEnv/rocketmq-4.3.2/bin
sh mqadmin updateTopic -n localhost:9876 -c DefaultCluster -t pushMessage
sh mqadmin updateTopic -n localhost:9876 -c DefaultCluster -t xmppMessage
sh mqadmin updateTopic -n localhost:9876 -c DefaultCluster -t userStatusMessage
sh mqadmin updateTopic -n localhost:9876 -c DefaultCluster -t HWPushMessage
sh mqadmin updateTopic -n localhost:9876 -c DefaultCluster -t fullPushMessage
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

查看已创建的Topic

echo `sh mqadmin topicList -n localhost:9876`
  • 1

设置rocketmq控制台运维启动命令,刷新后启动

alias startRocketMQDashboard='nohup java -jar /Users/xianzhemao/devEnv/rocketmq-dashboard-1.0.1-SNAPSHOT.jar &'
source .zshrc
startRocketMQDashboard
  • 1
  • 2
  • 3
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/空白诗007/article/detail/877350
推荐阅读
相关标签
  

闽ICP备14008679号