一、两种搭建方式
1、storm单节点搭建
2、完全分布式搭建
二、storm单节点搭建
准备
下载地址:Index of /dist/storm
1、环境准备:
Java 6+
Python 2.6.6+
2、上传、解压安装包
3、在storm目录中创建logs目录
mkdir logs
启动
./storm help
4、启动Zookeeper
./bin/storm dev-zookeeper >> ./logs/zk.out 2>&1 &
5、启动Nimbus
./bin/storm nimbus >> ./logs/nimbus.out 2>&1 &
6、启动Storm UI
./bin/storm ui >> ./logs/ui.out 2>&1 &
7、启动Supervisor
./bin/storm supervisor >> ./logs/supervisor.out 2>&1 &
8、启动Logviewer
./bin/storm logviewer &
查看进程信息
jps
ss-nel
访问UI
http://node1:8080
三、完全分布式搭建
killall java 杀死所有java进程
准备
1、环境准备
java 6+
Python 2.6.6+
2、部署ZooKeeper
版本3.4.5+(高版本Zookeeper实现了对于自身持久化数据的定期删除功能)
(autopurge.purgeInterval; autopurge.snapRetainCount)
3、上传、解压安装包
tar -zxf apache-storm-0.10.0.tar.gz -C /opt
4、在Storm目录中创建logs目录
$ mkdir logs
5、修改配置文件
storm.yaml
Yet Another Markup Language (yaml)
6、配置文件内容
storm.zookeeper.servers:- "node2"- "node3"- "node4"
# storm.local.dir: "/tmp/storm"
nimbus.host: "node1"
supervisor.slots.ports:- 6700- 6701- 6702- 6703
7、分发storm
8、启动Zookeeper集群
zkServer.sh start
9、在node1上启动Nimbus
./bin/storm nimbus >> ./logs/nimbus.out 2>&1 &
./bin/storm ui >> ./logs/ui.out 2>&1 &
./bin/stom logviewer >> ./logs/logviewer.out 2>&1 &
10、在node2、node3上启动Supervisor和Logviewer
(按照配置每个Supervisor上启动4个slots)
./bin/storm supervisor >> ./logs/supervisor.out 2>&1 &
jps
./bin/stom logviewer >> ./logs/logviewer.out 2>&1 &
STORM UI
启动Storm UI
./storm ui >> ./logs/ui.out 2>&1 &
通过http://node1:8080/访问