博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
storm分布式环境搭建
阅读量:2428 次
发布时间:2019-05-10

本文共 2083 字,大约阅读时间需要 6 分钟。

集群环境

主机操作系统:Centos-7.3-x64zookeeper环境(已搭建好):    zk1: 192.168.103.15    zk2: 192.168.103.5    zk3: 192.168.103.3主机列表:    nimbus: 192.168.103.16    storm1: 192.168.103.10    storm2:192.168.103.7    storm3: 192.168.103.21jdk环境:jdk1.8

安装步骤

1.下载并解压storm安装包

下载storm安装包(1.0.6),并解压到/opt目录下。

# wget  http://apache.forsale.plus/storm/apache-storm-1.0.6/apache-storm-1.0.6.tar.gz# tar xf apache-storm-1.0.6.tar.gz  -C  /opt/

修改nimbus, storm1, storm2, storm3主机/etc/hosts文件

192.168.103.16 nimbus192.168.103.10 storm1192.168.103.7  storm2192.168.103.21 storm3

2.修改配置

storm.zookeeper.port: 30000storm.zookeeper.servers:     - "192.168.103.15"     - "192.168.103.5"     - "192.168.103.3" storm.local.dir: "/opt/apache-storm-1.0.6/status" nimbus.seeds: ["nimbus"] supervisor.slots.ports:     - 6700     - 6701     - 6702     - 6703

配置文件描述

storm.zookeeper.servers

  • zookeeper集群地址

storm.zookeeper.port

  • 如果zookeeper服务端口不是默认端口,需要在此指定

storm.local.dir

  • The Nimbus and Supervisor daemons require a directory on the local disk to store small amounts of state
  • Nimbus和Supervisor 守护进程存储状态的路径

nimbus.seeds

  • The worker nodes need to know which machines are the candidate of master in order to download topology jars and confs

  • 主控节点,可以配置多个

supervisor.slots.ports

  • For each worker machine, you configure how many workers run on that machine with this config. Each worker uses a single port for receiving messages, and this setting defines which ports are open for use. If you define five ports here, then Storm will allocate up to five workers to run on this machine. If you define three ports, Storm will only run up to three. By default, this setting is configured to run 4 workers on the ports 6700, 6701, 6702, and 6703.

  • worker进程用于接收消息的端口

3. 复制到集群

storm1,storm2, storm3执行如下指令

# cd /opt# scp   -r  root@nimbus:/opt/apache-storm-1.0.6  .

4.启动集群

nimbus 节点

/opt/apache-storm-1.0.6/bin/storm nimbus 1>/dev/null 2>&1 &/opt/apache-storm-1.0.6/bin/storm ui 1>/dev/null 2>&1 &

storm1, storm2, storm3节点

/opt/apache-storm-1.0.6/bin/storm supervisor  1>/dev/null 2>&1 &

访问storm集群的ui界面

http://192.168.103.16:8080

这里写图片描述

当出现以上页面时,说明集群搭建正确。

你可能感兴趣的文章
PHP 语言地位遭受挑战,PHP 程序员路在何方?
查看>>
PostgreSQL好评如潮,它是如何做到的?
查看>>
2017码云群英会,共享开源技术盛宴
查看>>
看完这份参会指南,Get 2017 OSC 年终盛典正确参会姿势!
查看>>
盛食厉兵 中科天玑挖掘大数据价值助力行业数字化转型
查看>>
白鹭引擎正式支持微信小游戏开发
查看>>
2018年,你所不知道的Jira!
查看>>
2017年,阿里巴巴开源的那些事
查看>>
这有一节价值30美元的AI免费课等您领取
查看>>
4个最受欢迎的大数据可视化工具!
查看>>
边缘计算与物联网精华问答 | 边缘计算和物联网有什么关系?
查看>>
DevOps“兵器”60样,你都会使哪几样?
查看>>
云漫圈 | 腾讯面试,我竟然输给了final关键字
查看>>
为什么不用原生Spring-Cloud-Config
查看>>
写给程序员的裁员防身指南
查看>>
学习微服务网关zuul,看这篇就够了
查看>>
使用Kubernetes和Docker将Spring Boot与MongoDB作为容器部署
查看>>
5种数据分析常用的思维方法!
查看>>
分布式系统与消息投递
查看>>
“迁移策略+新容器运行时”应对有状态应用的冷热迁移挑战
查看>>