- RocketMQ服务搭建
- 下载RocketMQ源码 : Apache Download Mirrors
- 解压 :rocketmq-all-4.9.2-bin-release.zip
- unzip rocketmq-all-4.9.2-bin-release.zip
- 如果没有 unzip 命令 安装 yum install unzip
修改 bin/runserver.sh
因为 RocketMQ JAVA_OPT 设置的默认参数较大,需要根据实际情况修改
JAVA_OPT="${JAVA_OPT} -server –Xms128m –Xmx128m –Xmn128m"
修改 bin/runbroker.sh
因为 RocketMQ JAVA_OPT 设置的默认参数较大,需要根据实际情况修改
JAVA_OPT="${JAVA_OPT} -server –Xms128m –Xmx128m –Xmn128m"
修改 conf/broker.conf
添加:
autoCreateTopicEnable=true
brokerIP1=192.168.117.108
启动NameServer
nohup sh bin/mqnamesrv &
启动mqbroker
nohup sh bin/mqbroker -n 192.168.117.108:9876 -c conf/broker.conf &
停止服务
./bin/mqshutdown broker
./bin/mqshutdown namesrv
启动成功