RocketMQ 搭建
RocketMQ 二进制包安装 单机部署
# unzip rocketmq-all-4.7.1-bin-release.zip
# mv rocketmq-all-4.7.1-bin-release /usr/local/rocketmq
# mkdir -p /usr/local/rocketmq/store
# mkdir -p /usr/local/rocketmq/store/commitlog
# mkdir -p /usr/local/rocketmq/store/consumequeue
# mkdir -p /usr/local/rocketmq/store/index
# export ROCKETMQ_HOME=/usr/local/rocketmq
# export NAMESRV_ADDR=192.168.10.13:9876
# cd /usr/local/rocketmq/conf
# vim default-broker.properties \\ 创建配置文件
namesrvAddr=192.168.10.13:9876;
messageIndexSafe=true
autoCreateTopicEnable=true
waitTimeMillsInSendQueue=5000
sendMessageThreadPoolNums=64
useReentrantLockWhenPutMessage=true
defaultReadQueueNums = 16
defaultWriteQueueNums = 16
brokerIP1=192.168.10.13
brokerClusterName=clusterName
brokerName=localhost.localdomain
brokerId=0
deleteWhen=04
fileReservedTime=48
brokerRole=ASYNC_MASTER
flushDiskType=ASYNC_FLUSH
listenPort=port
storePathRootDir=/usr/local/rocketmq/store
storePathCommitLog= /usr/local/rocketmq/store/commitlog
storePathConsumeQueue=/usr/local/rocketmq/store/consumequeue
storePathIndex=/usr/local/rocketmq/store/index
# cd /usr/local/rocketmq/bin
# vim runbroker.sh
JAVA_OPT="${JAVA_OPT} -server -Xms1g -Xmx1g -Xmn512m -XX:PermSize=128m -XX:MaxPermSize=320m"
# vim runserver.sh
JAVA_OPT="${JAVA_OPT} -server -Xms1g -Xmx1g -Xmn512m -XX:PermSize=128m -XX:MaxPermSize=320m"
# /usr/local/rocketmq/bin/mqnamesrv & \\ 启动 9876被监听
# /usr/local/rocketmq/bin/mqbroker & \\ 启动 10911 10912被监听
rocketmq-externals RocketMQ监控平台部署
# cd /usr/local
# git clone https://github.com/apache/rocketmq-externals.git
# cd /usr/local/rocketmq-externals/rocketmq-console/src/main/resources
# vim application.properties
server.port=8080
rocketmq.config.namesrvAddr=192.168.10.13:9876
rocketmq.config.dataPath=/usr/local/rocketmq-console/data
# cd /usr/local/rocketmq-externals/rocketmq-console
# java -jar /usr/local/rocketmq-externals/rocketmq-console/target/rocketmq-console-ng-2.0.0.jar & \\ 8080被监听
http://192.168.10.13:8080/ \\ 浏览器访问
注:
下载地址http://rocketmq.apache.org/dowloading/releases/
12条评论