RocktMQ安装
一、RocktMQ安装
下载地址:
https://archive.apache.org/dist/rocketmq/
下载安装包:rocketmq-all-5.0.0-bin-release.zip
上传到/data/tools目录
解压:
unzip rocketmq-all-5.0.0-bin-release.zip
编辑环境变量:
vi /etc/profile
export ROCKETMQ_HOME=
/data/tools/rocketmq-all-5.0.0-bin-release
export PATH=$ROCKETMQ_HOME/bin:$PATH
保存后:source /etc/profile
启动nameserver和broker,nameserver类似注册中心,broker类似一个服务注册在其中,所以应该先启动nameserver,
nohup sh mqnamesrv &
后启动broker,
nohup sh mqbroker -n 10.241.131.26:9876 autoCreateTopicEnable=true &
关闭时请先关闭broker,
sh bin/mqshutdown broker
后关闭nameserver,
sh bin/mqshutdown namesrv
二、RocketMq插件安装
通过插件可以可视化查看rocketMq数据:
docker pull apacherocketmq/rocketmq-dashboard:latest
docker run -d --name rocketmq-dashboard -e "JAVA_OPTS=-Drocketmq.namesrv.addr=10.241.131.26:9876" -p 8080:8080 -t apacherocketmq/rocketmq-dashboard:latest
访问:
http://10.241.131.51:8080/#/