安装部署
1、 下载安装包并解压
下载地址:
将目录alibaba-rocketmq copy 到/usr/local/下
2、 环境变量配值
export JAVA_HOME=/usr/local/jdk1.7.0_79
export ROCKETMQ_HOME=/usr/local/alibaba-rocketmq
export CLASSPATH=/usr/local/jdk1.7.0_79/lib
export PATH=$JAVA_HOME/bin:$PATH:$ROCKETMQ_HOME/bin
启停操作
? 启动nameserver
nohup sh /usr/local/alibaba-rocketmq/bin/mqnamesrv 1>$ROCKETMQ_HOME/log/ng.log 2>$ROCKETMQ_HOME/log/ng-error.log &
? 验证nameserver是否启动
$tail -f $ROCKETMQ_HOME/log/ng.log
The Name Server boot success.
? 停止nameServer
sh /usr/local/alibaba-rocketmq/bin/mqshutdown namesrv
The mqnamesrv(12248) is running...
Send shutdown request to mqnamesrv(12248) OK
? 启动broker(单master)(多master,多master+slave)对应的(异步复制,同步双写)
Nohup sh /usr/local/alibaba-rocketmq/bin/mqbroker –n 9876 -c $ROCKETMQ_HOME/conf/2m-noslave/broker-a.properties >$ROCKETMQ_HOME/log/mq.log &
? 验证mqbroker是否启动
tail -f $ROCKETMQ_HOME/log/mq.log
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=320m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: UseCMSCompactAtFullCollection is deprecated and will likely be removed in a future release.
The broker[e010125001186.bja, 10.125.1.186:10911] boot success. and name server is 10.125.1.186:9876
? 停止broker
sh /usr/local/alibaba-rocketmq/bin/mqshutdown broker
The mqbroker(13634) is running...
Send shutdown request to mqbroker(13634) OK
运维命令
? 查看集群情况
/usr/local/alibaba-rocketmq/bin/mqadmin clusterList -n 127.0.0.1:9876
? 查看broker状态
/usr/local/alibaba-rocketmq/bin/mqadmin brokerStatus -n 127.0.0.1:9876 -b 192.168.162.10:10911
? 查看topic列表
/usr/local/alibaba-rocketmq/bin/mqadmin topicList -n 127.0.0.1:9876
? 查看topic状态
/usr/local/alibaba-rocketmq/bin/mqadmin topicStatus -n 127.0.0.1:9876 -t PushTopic
? 查看topic路由
/usr/local/alibaba-rocketmq/bin/mqadmin topicRoute -n 127.0.0.1:9876 -t PushTopic
阅读(3401) | 评论(0) | 转发(0) |