标签:
[root@master software]# tar -zxf apache-storm-0.10.0.tar.gz -C /opt/modules
[root@master software]# cd /opt/modules
[root@master modules]# mv apache-storm-0.10.0 storm-0.10.0
部署依赖环境
Java 6+
Python 2.6.6+
3.4.5+
ZK为什么要用3.4.5,因为它支持磁盘的快照和namenode的定期删除,
避免磁盘被打满
分发storm包
0.9.4+
修改/opt/modules/storm-0.10.0/conf/目录下的storm.yaml配置文件
[root@master conf]# pwd
/opt/modules/storm-0.10.0/conf
[root@master conf]# vi storm.yaml
storm.zookeeper.servers:
- "master"
- "slave1"
- "slave2"
nimbus.host: "master"
[root@master modules]# scp -r storm-0.10.0 root@slave1:/opt/modules/storm-0.10.0
[root@master modules]# scp -r storm-0.10.0 root@slave2:/opt/modules/storm-0.10.0
/opt/modules/zookeeper/bin/zkServer.sh status
/opt/modules/zookeeper/bin/zkServer.sh start
[root@master storm-0.10.0]# cd /opt/modules/storm-0.10.0
[root@master storm-0.10.0]# ./bin/storm nimbus >> logs/nimbus.out 2>&1 &
[root@master storm-0.10.0]# tail -f logs/nimbus.log
[root@master ~]# cd /opt/modules/storm-0.10.0
[root@master storm-0.10.0]# ./bin/storm ui >> logs/ui.out 2>&1 &
[root@master storm-0.10.0]# tail -f logs/ui.log
在浏览器地址栏中输入:http://192.168.230.129:8080
启动master中的supervisor
[root@master ~]# cd /opt/modules/storm-0.10.0
[root@master storm-0.10.0]# ./bin/storm supervisor >> logs/supervisor.out 2>&1 &
[root@master storm-0.10.0]# tail -f logs/supervisor.log
启动slave1中的supervisor
[root@slave1 storm-0.10.0]# ./bin/storm supervisor >> logs/supervisor.out 2>&1 &
[root@slave1 storm-0.10.0]# tail -f logs/supervisor.log
启动slave2中的supervisor
[root@slave2 storm-0.10.0]# ./bin/storm supervisor >> logs/supervisor.out 2>&1 &
[root@slave2 storm-0.10.0]# tail -f logs/supervisor.log
[root@master storm-0.10.0]# ./bin/storm logviewer >> logs/logviewer.out 2>&1 &
[root@master storm-0.10.0]# tail -f logs/logviewer.log
验证:浏览器打开webUI,http://192.168.230.129:8080
[root@master storm-0.10.0]# ./bin/storm jar examples/storm-starter/storm-starter-topologies-0.10.0.jar storm.starter.WordCountTopology wordcount
标签:
原文地址:http://blog.csdn.net/qq_25371579/article/details/51096020