下载V1.0.0
http://mirrors.cnnic.cn/apache/storm/apache-storm-1.0.0/apache-storm-1.0.0.tar.gz
zookeeper信息
192.168.7.108:2181
192.168.7.109:2181
192.168.7.110:2181
Storm部署
Nimbus:192.168.7.111(active),192.168.7.112
Supervisor:192.168.7.111,192.168.7.112,192.168.7.113
检查python
storm@ydt-dsp-poc08:/ztapp/usr/storm >python -V Python 2.6.6 |
vi /etc/hosts
192.168.7.111 storm01
192.168.7.112 storm02
192.168.7.113 storm03
假设为:/home/usr/storm
将apache-storm-1.0.0.tar.gz解压:
tar -zxvf apache-storm-1.0.0.tar.gz
将解压后的目录命名为storm
mv apache-storm-1.0.0 storm
进入storm/conf目录,修改storm.yaml配置文件为如下内容:
# zookeeper ip storm.zookeeper.servers: - "192.168.7.108" - "192.168.7.109" - "192.168.7.110" storm.zookeeper.port: 2181 storm.zookeeper.root: "/storm" #Nimbus H/A nimbus.seeds: ["storm01","storm02"] #Nimbus dir storm.local.dir: "/ztapp/usr/storm/wkdir" #supervisor worker port, 4 workers example supervisor.slots.ports: - 6700 - 6701 - 6702 - 6703
|
注:每一个配置点前面需要加一个空格“”,否则启动时会报配置文件相关异常。
绝大多数配置信息都是使用默认值,具体参考:
https://github.com/apache/storm/blob/v1.0.0/conf/defaults.yaml
在storm nimbus启动之后,wkdir目录结构如下:
storm@ydt-dsp-poc08:/ztapp/usr/storm/wkdir >du 4 ./nimbus/history 4 ./nimbus/inbox 12 ./nimbus 4 ./blobs 12 ./supervisor/isupervisor 4 ./supervisor/tmp 20 ./supervisor/localstate 40 ./supervisor |
在192.168.7.111、192.168.7.112、192.168.7.113完成前面4步之后,按nimbus、supervisor的分布情况启动storm进程:
192.168.7.111启动nimbus、supervisor、ui
./storm/bin/storm nimbus & ./storm/bin/storm supervisor & ./storm/bin/storm ui &
|
192.168.7.112启动nimbus、supervisor、ui
./storm/bin/storm nimbus & ./storm/bin/storm supervisor & ./storm/bin/storm ui &
|
192.168.7.113启动supervisor
./storm/bin/storm supervisor &
|
http://192.168.7.111:8080
其他参考:
http://storm.apache.org/releases/1.0.0/Setting-up-a-Storm-cluster.html
http://storm.apache.org/releases/1.0.0/javadocs/org/apache/storm/Config.html
https://github.com/apache/storm/blob/v1.0.0/conf/defaults.yaml
新闻热点
疑难解答