一、环境
3台虚拟机,系统为centos,zookeeper版本为3.4.3
ip与hostname分别为192.168.41.100/master,192.168.41.101/slave1,192.168.41.102/slave2
二、安装
1、解压下载到的apache-storm-0.9.2-incubating.zip
# tar zvxf apache-storm-0.9.2-incubating.tar.gz -C /home/hadoop/
2、编辑storm.yaml配置文件
修改如下:
### ldir storm.local.dir: "/home/hadoop/storm-0.9.2-incubating/ldir" ### zookeeper storm.zookeeper.servers: - "master" - "slave1" - "slave2" ### nimbus host nimbus.host: "master" ### ui.* configs are for the master ui.port: 8081
如图:
3、将master下的storm的目录复制到其它发服务器下去
# scp -r /home/hadoop/apache-storm-0.9.2-incubating [email protected]:/home/hadoop # scp -r /home/hadoop/apache-storm-0.9.2-incubating [email protected]:/home/hadoop
4、启动各个节点的zookeeper
# bin/zkServer.sh start
5、在master上启动Nimbus
# storm nimbus &
6、在slave1、slave2上启动Supervisor
# storm supervisor &
slave1:
slave2:
7、在master上启动Storm UI
# storm ui &
三、验证
1.在浏览器打开:http://master:8081/index.html,可以看到如下界面:
2.Zookeeper下查看是否有对应storm的目录,可以看出zookeeper已经管理storm了。
时间: 2024-10-11 14:49:25