中间件:RocketMQ安装部署

单机部署

下载

cd /opt/soft/archive
wget https://archive.apache.org/dist/rocketmq/4.9.4/rocketmq-all-4.9.4-bin-release.zip
unzip -d ../ rocketmq-all-4.9.4-bin-release.zip

配置 broker.conf 的brokerIP1 为公网ip
启动命令:

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

集群部署

nohup sh bin/mqbroker -n '60.205.177.105:9876;60.205.204.171:9876;59.110.152.150:9876;60.205.203.101:9876;' -c /opt/rocketmq-4.9.3/conf/2m-2s-async/broker-a.properties &

nohup sh bin/mqbroker -n '60.205.177.105:9876;60.205.204.171:9876;59.110.152.150:9876;60.205.203.101:9876;' -c /opt/rocketmq-4.9.3/conf/2m-2s-async/broker-a-s.properties &

nohup sh bin/mqbroker -n '60.205.177.105:9876;60.205.204.171:9876;59.110.152.150:9876;60.205.203.101:9876;' -c /opt/rocketmq-4.9.3/conf/2m-2s-async/broker-b.properties &
 
nohup sh bin/mqbroker -n '60.205.177.105:9876;60.205.204.171:9876;59.110.152.150:9876;60.205.203.101:9876;' -c /opt/rocketmq-4.9.3/conf/2m-2s-async/broker-b-s.properties &

查看集群状态

sh mqadmin clusterList -n localhost:9876

基准测试

benchmark目录下

sh producer.sh -t xxx -n localhost:9876
sh consumer.sh -t xxx -n localhost:9876 

你可能感兴趣的:(运维,中间件,rocketmq)