美文网首页我爱编程
storm集群的安装配置

storm集群的安装配置

作者: 6cc89d7ec09f | 来源:发表于2018-03-28 23:04 被阅读17次

规划

在3台机器上安装storm
三个节点分别是:
bigdata-pro01.kfk.com
bigdata-pro02.kfk.com
bigdata-pro03.kfk.com

依赖

节点已经安装好zookeeper
java
kafka 1.0

版本下载

如果你的Storm安装的是1.0.X系列或更低的版本,建议你安装0.8.X.X版本的Kafka。
如果你的Storm安装的是1.1.X系列或更高的版本,建议你安装0.10.X.X版本的Kafka。
下载地址可以去官方下载
http://storm.apache.org/releases/1.1.2/Setting-up-a-Storm-cluster.html
我下载的是1.1.2的版本

配置部署

参考:http://storm.apache.org/releases/1.1.2/Setting-up-a-Storm-cluster.html
1 先解压

[kfk@bigdata-pro01 modules] tar -xvf apache-storm-1.1.2.tar.gz -C ../modules

2 到conf目录下修改storm.yaml

[kfk@bigdata-pro01 modules]$ cd storm-1.1.2/conf/
vim conf/storm.yaml

修改内容如下

storm.zookeeper.servers:
     - "bigdata-pro01.kfk.com"
     - "bigdata-pro02.kfk.com"
     - "bigdata-pro03.kfk.com"
 storm.local.dir: "/opt/modules/storm-1.1.2/storm-tmp"
 nimbus.seeds: ["bigdata-pro01.kfk.com"]
 supervisor.slots.ports:
    - 6700
    - 6701
    - 6702
    - 6703
 storm.health.check.dir: "/opt/modules/storm-1.1.2/healthchecks"
 storm.health.check.timeout.ms: 5000

注意 : 冒号后面必须有空格
详解
storm.zookeeper.servers :配置Zookeeper地址(配置Zookeeper的主机名,注意: 如果Zookeeper集群使用的不是默认端口,那么还需要配置storm.zookeeper.port)

storm.local.dir: The Nimbus and Supervisor daemons require a directory on the local disk to store small amounts of state (like jars, confs, and things like that)
这个目录在storm启动的时候会自动创建,当然也可以提前创建好。

配置supervisor.slots.ports
配置工作节点上的进程端口。你配置一个端口,意味着工作节点上启动一个worker,在实际的生产环境中,我们需要根据实际的物理配置以及每个节点上的负载情况来配置这个端口的数量。在这里每个节点我象征性的配置4个端口。

3、分发安装目录到其他节点
4、配置环境变量

vim /etc/profile
export STORM_HOME=/opt/modules/storm-1.1.2
export PATH=$STORM_HOME/bin:$PATH
source /etc/profile

启动

Nimbus: Run the command "bin/storm nimbus" under supervision on the master machine.
Supervisor: Run the command "bin/storm supervisor" under supervision on each worker machine. The supervisor daemon is responsible for starting and stopping worker processes on that machine.
UI: Run the Storm UI (a site you can access from the browser that gives diagnostics on the cluster and topologies) by running the command "bin/storm ui" under supervision. The UI can be accessed by navigating your web browser to http://{ui host}:8080.

启动Nimbus:bin/storm nimbus
启动Supervisor:bin/storm supervisor
启动UI:bin/storm ui

相关文章

网友评论

    本文标题:storm集群的安装配置

    本文链接:https://www.haomeiwen.com/subject/kvkpcftx.html