Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1106511
  • 博文数量: 143
  • 博客积分: 969
  • 博客等级: 准尉
  • 技术积分: 1765
  • 用 户 组: 普通用户
  • 注册时间: 2011-07-30 12:09
文章分类

全部博文(143)

文章存档

2023年(4)

2021年(2)

2020年(4)

2019年(4)

2018年(33)

2017年(6)

2016年(13)

2014年(7)

2013年(23)

2012年(33)

2011年(14)

我的朋友

分类: LINUX

2016-08-24 18:03:20

安装部署
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) |
0

上一篇:进程监控脚本

下一篇:FastDFS架构

给主人留下些什么吧!~~