rocketmq部署

rocketmq安装
unzip 
环境变量
vim /etc/profile
export PATH=$PATH:/data/env/rocketmq/bin
export NAMESRV_ADDR=192.168.15.6:9876
source /etc/profile

cd bin
vim runserver.sh
JAVA_OPT="${JAVA_OPT} -server -Xms512m -Xmx512m -Xmn256m"
vim runbroker.sh
JAVA_OPT="${JAVA_OPT} -server -Xms512m -Xmx512m -Xmn256m"

修改日志文件路径,可修改至/data/env/rocketmq/logs下面
在以下文件中替换默认的日志路径 ${user.home}/logs/rocketmqlogs/* 
conf/logback_broker.xml
conf/logback_namesrv.xml
conf/logback_tools.xml

vim broker.conf 
namesrvAddr =192.168.15.6:9876
brokerClusterName = DefaultCluster
brokerName = broker-a
listenPort=10911
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
storePathRootDir=/data/env/rocketmq/store/store
storePathCommitLog=/data/env/rocketmq/store/commitlog
storePathConsumeQueue=/data/env/rocketmq/store/consumequeue
storePathIndex=/data/env/rocketmq/store/index
storeCheckpoint=/data/env/rocketmq/store/checkpoint
abortFile=/data/env/rocketmq/store/abort

启动Name Server
nohup mqnamesrv >/data/env/rocketmq/logs/mqnamesrv.log 2>&1 &
启动Broker
nohup mqbroker -c /data/env/rocketmq/conf/broker.conf >/data/env/rocketmq/logs/broker.log 2>&1 &

关闭Name Server和Broker
mqshutdown broker
mqshutdown namesrv

查看配置
mqbroker -m 

#部署 rockermq console
docker pull styletang/rocketmq-console-ng
docker run --name rocketmq-console -dit -e "JAVA_OPTS=-Drocketmq.namesrv.addr=127.0.0.1:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false -server -Xms512m -Xmx512m -Xmn256m -XX:PermSize=128m -XX:MaxPermSize=128m" -p 8080:8080 styletang/rocketmq-console-ng bash

#参考
https://www.cnblogs.com/ylty/p/11851491.html
https://github.com/apache/rocketmq/tree/master/docs/cn
posted @ 2020-05-19 15:38  kylingx  阅读(151)  评论(0编辑  收藏  举报