centos 安装rocketmq
下载rocketMq:
wget https://archive.apache.org/dist/rocketmq/4.9.0/rocketmq-all-4.9.0-bin-release.zip
安装解压工具:
yum install -y unzip zip
解压:
unzip rocketmq-all-4.9.0-bin-release.zip
进入文件夹:
cd rocketmq-all-4.9.0-bin-release
按需修改启动内存:
修改bin下runbroker.sh 和runserver.sh文件的内存
在rocket的conf目录下修改broker.conf文件,配置修改如下:
brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
# 新增的配置,broker默认端口
namesrvAddr=127.0.0.1:9876
brokerIP1=127.0.0.1
listenPort=8911
启动:nohup sh bin/mqnamesrv &
启动:nohup sh bin/mqbroker -n localhost:9876 & 或 nohup sh bin/mqbroker -n 127.0.0.1:9876 -c conf/broker.conf autoCreateTopicEnable=true &