1.JDK安装
系统已安装JDK 1.7
2.python安装
centos自带pyhton 2.6.6
检测一下:
[hadoop@yun01-dn-01 storm]$ python --version
Python 2.6.6
3.zookeeper安装
系统已安装zookeeper 3.4.5,详见前面日志:http://www.aboutyun.com/home.php?mod=space&uid=40798&do=blog&id=2975
4.安装storm 0.9.3
4.1 将apache-storm-0.9.3.tar.gz上传并解压:
tar -zxvf apache-storm-0.9.3.tar.gz
重命名:
mv apache-storm-0.9.3 storm
4.2 修改storm.yaml 配置:
cd /application/hadoop/storm/bin/conf
vi storm-yaml.xml
#Zookeeper集群地址
storm.zookeeper.servers:
- "yun01-nn-02"
- "yun01-dn-01"
- "yun01-dn-02"
#Storm存储少量文件的路径
storm.local.dir: "/application/hadoop/storm/workdir"
#主控节点的地址
nimbus.seeds: "yun01-nn-01"
#supervisor上worker端口
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
4.3 创建目录/application/hadoop/storm/workdir:
在storm目录下:
mkdir workdir
4.4 将storm拷贝到其它节点
回到/application/hadoop目录:
scp -r storm hadoop@yun01-dn-01:/application/hadoop
scp -r storm hadoop@yun01-dn-02:/application/hadoop
5. 启动
在主控节点启动nimnus:
[hadoop@yun01-nn-02 storm]$ bin/storm nimbus >/dev/null 2>&1 &
在各工作节点启动supervisor:
[hadoop@yun01-dn-01 storm]$ bin/storm supervisor >/dev/null 2>&1 &
[hadoop@yun01-dn-02 storm]$ bin/storm supervisor >/dev/null 2>&1 &
在主控节点启动ui:
[hadoop@yun01-nn-02 storm]$ bin/storm ui >/dev/null 2>&1 &
查看守护进程:
[hadoop@yun01-nn-02 ~]$ jps
1778 nimbus
1855 core
2025 Jps
1679 QuorumPeerMain
6. web界面查看
http://192.168.56.12:8080/index.html