storm完全分布式安装
-
节点 nimbus supervisor ZK slave1 1 0 1 slave2 0 1 1 slave3 0 1 1 - 解压,创建目录/opt/storm/
- 修改conf/storm.yaml
storm.zookeeper.servers: - "slave1" - "slave2" - "slave3" storm.local.dir: "/root/storm" nimbus.host: "slave1" supervisor.slots.ports: - 6700 - 6701 - 6702 - 6703
- 分发到其他节点
scp -r storm0.10.2 slave2:/opt/storm/
- 配置环境变量
export STORM_HOME=/opt/storm/storm0.10.1
- 启动ZooKeeper集群
每个节点运行zkServer.sh start
在安装目录下创建日志目录 mkdir logs slave1上启动Nimbus,web监控模块 $ storm nimbus >> ./logs/nimbus.out 2>&1 & $ tail -f logs/nimbus.out $ storm ui >> ./logs/ui.out 2>&1 & $ tail -f logs/ui.out
节点slave2和slave3启动supervisor,按照配置,每启动一个supervisor就有了4个slots $ storm supervisor >> ./logs/supervisor.out 2>&1 & $ tail -f logs/supervisor.out (当然node1也可以启动supervisor)
http://slave1:8080/,可以看到storm集群的信息和拓扑信息