原文链接:https://blog.51cto.com/4259679
RocketMQ 是一款分布式、队列模型的消息中间件,具有以下特点:能够保证严格的消息顺序 提供丰富的消息拉取模式 高效的订阅者水平扩展能力 实时的消息订阅机制 亿级消息堆积能力
[root@k8s-master ~]# unzip rocketmq-all-4.8.0-bin-release.zip
Archive: rocketmq-all-4.8.0-bin-release.zip
creating: rocketmq-all-4.8.0-bin-release/
creating: rocketmq-all-4.8.0-bin-release/benchmark/
inflating: rocketmq-all-4.8.0-bin-release/benchmark/consumer.sh
inflating: rocketmq-all-4.8.0-bin-release/benchmark/runclass.sh
inflating: rocketmq-all-4.8.0-bin-release/benchmark/tproducer.sh
[root@k8s-master ~]# mv rocketmq-all-4.8.0-bin-release /usr/local/rocketmq
[root@k8s-master ~]# cd /usr/local/rocketmq/
[root@k8s-master rocketmq]# ls
benchmark bin conf lib LICENSE NOTICE README.md
[root@k8s-master rocketmq]#
[root@k8s-master ~]# mkdir -p /usr/local/rocketmq/logs/rocketmqlogs
[root@k8s-master ~]# cd /usr/local/rocketmq/conf/
[root@k8s-master conf]# ls
2m-2s-async 2m-2s-sync 2m-noslave broker.conf dledger logback_broker.xml logback_namesrv.xml logback_tools.xml plain_acl.yml tools.yml
[root@k8s-master conf]# cd /usr/local/rocketmq/conf && sed -i 's#${user.home}#/usr/local/rocketmq#g' *.xml
[root@k8s-master conf]# cd /usr/local/rocketmq/bin/
[root@k8s-master bin]# ls
[root@k8s-master bin]# vim runserver.sh
JAVA_OPT="${JAVA_OPT} -server -Xms64m -Xmx64m -Xmn64m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
[root@k8s-master bin]# vim runbroker.sh
JAVA_OPT="${JAVA_OPT} -server -Xms64m -Xmx64m -Xmn64m"
[root@k8s-master rocketmq]# cd conf/
[root@k8s-master conf]# ls
2m-2s-async 2m-2s-sync 2m-noslave broker.conf dledger logback_broker.xml logback_namesrv.xml logback_tools.xml plain_acl.yml tools.yml
[root@k8s-master conf]# cd 2m-2s-sync/
[root@k8s-master 2m-2s-sync]# ls
broker-a.properties broker-a-s.properties broker-b.properties broker-b-s.properties
[root@k8s-master 2m-2s-sync]# vim broker-a.properties
brokerClusterName=rocketmq-cluster
brokerName=broker-a
[root@k8s-master bin]# nohup ./mqnamesrv &
[1] 7839
root@k8s-master rocketmq]# jps
7858 NamesrvStartup
8098 Jps
[root@k8s-master bin]# nohup sh mqbroker -c /usr/local/rocketmq/conf/2m-2s-sync/broker-a.properties &
[2] 8122
[root@k8s-master bin]# nohup: ignoring input and appending output to ‘nohup.out’
[root@k8s-master bin]# jps
7858 NamesrvStartup
8130 BrokerStartup
8182 Jps
MQ部署完成
----------------------end---------------------
推荐阅读:
Nginx版本平滑升级
Nginx隐藏式跳转
Kafka 集群部署
Nginx访问控制
Redis搭建哨兵