您的位置:首页 > 其它

Storm 1.0.2集群安装指导

2016-12-22 10:33 337 查看

Storm 1.0.2集群安装指导

安装前准备

必要的安装语言依赖,主要包括了JDK和Python语言库。

Java 7+

Python 2.6.6

下载最新的Storm编译包,最新的稳定版是1.0.2。

下载链接:

https://github.com/apache/storm/archive/v1.0.2.zip

cd /opt
curl https://github.com/apache/storm/archive/v1.0.2.zip unzip storm-1.0.2.zip
mv storm-1.0.2 storm


安装Zookeeper集群

假设已经安装成功了Zookeeper集群,信息如下:

10.50.115.16:2181
10.50.115.17:2181
10.50.115.15:2181


规划Storm集群信息

Storm信息规划,

Nimbus:10.50.115.15(active),10.50.115.16
Supervisor:10.50.115.15,10.50.115.16,10.50.115.17


Storm配置信息

修改每台集群的hosts文件,添加下面内容:

10.50.115.15 storm01
10.50.115.16 storm02
10.50.115.17 storm03


并且,每台机器的hostname修改为对应的storm01, storm02和storm03。

进入storm/conf目录,修改storm.yaml配置文件。

zookeeper ip

storm.zookeeper.servers:

- “10.50.115.15”

- “10.50.115.16”

- “10.50.115.17”

storm.zookeeper.port: 2181

storm.zookeeper.root: “/storm”

Nimbus H/A,请特别注意这里的格式

nimbus.seeds: [“storm01”,”storm02”]

Nimbus dir

storm.local.dir: “/opt/storm”

supervisor worker port, 4 workers example

supervisor.slots.ports:

- 6700

- 6701

- 6702

- 6703

配置环境变量

修改~/.bashrc文件,添加下面内容。

## storm conf
export STORM_HOME=/opt/storm
export PATH=$PATH:$STORM_HOME/bin


让配置起效:

. ~/.bashrc


编辑对应启动脚本

启动nimbus,脚本nimbus.sh:

eval storm nimbus > nimbus.log  2>&1 "&"


启动supervisor,脚本supervisor.sh:

eval storm supervisor > supervisor.log  2>&1 "&"


启动storm ui, 脚本ui.sh:

eval storm ui > ui.log  2>&1 "&"


依次按照下面顺序执行对应脚本。

10.50.115.15, 10.50.115.16运行 nimbus.sh, supervisor.sh,

10.50.115.17运行 supervisor.sh,

10.50.115.15运行nimbus.sh.

UI浏览集群信息。

通过10.50.115.15运行的UI进程,我们可以查看storm集群信息。

http://10.50.115.15:8080



欢迎订阅微信公众号

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  storm