RocketMQ单机版本安装

上一篇 << 下一篇 >>>RocketMQ集群环境程序启用相关知识点


上传最新的RocketMQ安装包 rocketmq-all-4.6.0-bin-release

1.解压配置文件

unzip rocketmq-all-4.6.0-bin-release.zip
-bash: unzip: 未找到命令
解决办法:yum install -y unzip zip

2.修改NameServer、Broker服务器内存 默认为4g内存、8G

# runserver.sh
JAVA_OPT="${JAVA_OPT} -server –Xms128m –Xmx128m –Xmn128m"

# runbroker.sh
JAVA_OPT="${JAVA_OPT} -server –Xms128m –Xmx128m –Xmn128m"

#broker.conf
新增:
autoCreateTopicEnable=true
brokerIP1=116.62.55.111

3.启动NameServer

nohup sh bin/mqnamesrv &
nohup sh bin/mqnamesrv -c conf/namesrv.properties &

4.启动mqbroker

nohup sh bin/mqbroker -n 10.211.55.16:9876 -c conf/broker.conf &

5.退出

./bin/mqshutdown broker
./bin/mqshutdown namesrv

6.成功图示


7.异常解决

  • Please set the JAVA_HOME variable in your environment, We need java(x64)! !!
    解决办法:
    查看runserver.sh文件,修改正确的JAVA_HOME是否正确
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/local/jdk1.8.0_141
[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME variable in your environment, We need java(x64)!"
  • org.apache.rocketmq.remoting.exception.RemotingTooMuchRequestException: sendDefaultImpl call timeout
    解决办法:
    a、关闭防火墙
    b、调大生产者的时间send-message-timeout

推荐阅读:
<<<消息中间件的核心思想
<<<消息中间件常见问题汇总
<<<基于Netty简单手写消息中间件思路
<<<消息队列常用名词与中间件对比
<< << << << << << << << << << << << << << << << << << << << << << << << << << << << << << << <<

你可能感兴趣的:(RocketMQ单机版本安装)