Storm 安装及搭建集群环境

搭建storm的集群环境

 

 

官方下载地址址:http://storm.apache.org/
注意:本博主使用版本 Storm 1.1.3 Released

 

 a)     在hadoop-001主机解压apache-storm-1.1.3


 

tar -zxvf apache-storm-1.1.3.tar.gz


 

b)     配置环境变量

 vi  ~/.bash_profile


export STORM_HOME=/home/hadoop/bigdatasoftware/apache-storm-1.1.3
PATH=$PATH:$STORM_HOME/bin


 

c)      编写conf/storm-env.sh文件


 export JAVA_HOME=/home/hadoop/bigdatasoftware/jdk1.8.0_161

 export STORM_CONF_DIR=/home/hadoop/bigdatasoftware/apache-storm-1.1.3/conf


 

d)     分别在不同的主机hadoop-001、hadoop-002、hadoop-003,新建目录


mkdir -p /home/hadoop/stormdata


 

e)     编辑conf/storm.yaml文件


 storm.zookeeper.servers:

- "hadoop-001"
- "hadoop-002"
- "hadoop-003"
storm.local.dir: "/home/hadoop/stormdata"
nimbus.host: "hadoop-001"
supervisor.slots.ports:
- 6700
- 6701
- 6703
- 6704


 

 f) 将storm分发到不同的主机


scp -r /home/hadoop/bigdatasoftware/apache-storm-1.1.3 hadoop@hadoop-002:/home/hadoop/ bigdatasoftware /

              scp -r /home/hadoop/ bigdatasoftware /apache-storm-1.1.3 hadoop@hadoop-003:/home/hadoop/ bigdatasoftware /

scp -r ~/.bash_profile  hadoop@hadoop-002:~/.bash_profile

scp -r ~/.bash_profile  hadoop@hadoop-003:~/.bash_profile

分发完成脚本文件,必须 source一下

source ~/.bash_profile


 

 g)     启动集群的storm环境(注意必须要在bin目录下启动)


nohup sh storm nimbus &(hadoop-master主机启动)

nohup sh storm ui & (hadoop-master主机启动)

nohup sh storm supervisor &(hadoop-001主机启动、hadoop-003主机启动、hadoop-002主机启动)

nohup sh storm logviewer &(hadoop-001主机启动、hadoop-003主机启动、hadoop-002主机启动)


 

h)     查看进程(输入jps)

 

 

i)       打开浏览器:输入http://hadoop-001:8080/index.html(注意配置C:\Windows\System32\drivers\etc\ hosts)

 

 

 

posted @ 2019-05-17 22:42  Transkai  阅读(447)  评论(0编辑  收藏  举报