当前位置: 首页 > news >正文

(一) storm的集群安装与配置

机器:

192.168.180.101

192.168.187.16

需要准备的软件有:

zookeeper(zookeeper-3.4.4.tar.gz),storm(storm-0.8.1.zip) ,jdk

1、配置zookeeper

解压zookeeper,将conf目录下的zoo_sample.cfg 重命名为:zoo.cfg

修改后内容为:

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just 
# example sakes.
dataDir=/data/zookeeper/data
dataLogDir=/data/zookeeper/log
# the port at which the clients will connect
clientPort=2181
#
# Be sure to read the maintenance section of the 
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.1=192.168.187.16:2888:3888
server.2=192.168.180.101:2888:3888

具体配置可以参看:
 http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_configuration

注意,最后两行的配置:

格式为:server.id=host:port:port

id只能为数字 1-255,同时需要在 dataDir目录下面新建一个文件名为myid的文件,里面的内容只有一行:"id"

Every machine that is part of the ZooKeeper ensemble should know about every other machine in the ensemble. You accomplish this with the series of lines of the form server.id=host:port:port. The parameters host and port are straightforward. You attribute the server id to each machine by creating a file named myid, one for each server, which resides in that server's data directory, as specified by the configuration file parameter dataDir.

接着还需要添加环境变量:

export ZOOKEEPER_HOME=/home/zhxia/apps/db/zookeeper

两台机器上环境配置相同,但是myid文件内的id指不一样

 2、配置storm

解压storm

进入conf目录,编辑storm.yaml文件

########## These MUST be filled in for a storm configuration
 storm.zookeeper.servers:
     - "192.168.187.16"
     - "192.168.180.101"

 nimbus.host: "192.168.187.16"

 storm.local.dir: "/data/storm/data"
 ##### These may optionally be filled in:

# List of custom serializations
# topology.kryo.register:
#     - org.mycompany.MyType
#     - org.mycompany.MyType2: org.mycompany.MyType2Serializer
#
## List of custom kryo decorators
# topology.kryo.decorators:
#     - org.mycompany.MyDecorator

# Locations of the drpc servers
# drpc.servers:
    # - "127.0.0.1"
     #- "server2"
## to nimbus 
#nimbus.childopts: "-Xmx1024m" 
#
## to supervisor 
#supervisor.childopts: "-Xmx1024m" 
#
## to worker 
#worker.childopts: "-Xmx768m" 

配置完成之后,开始启动zookeeper和storm

启动zookeeper

bin/zkServer.sh start

启动storm

bin/storm nimbus

bin/storm supervisor

bin/storm ui

浏览器打开: http://localhost:8080 查看集群的运行状态

 

 

 

 

转载于:https://www.cnblogs.com/xiazh/archive/2013/03/04/2827715.html

相关文章:

  • (转载)利用webkit抓取动态网页和链接
  • Silverlight数据绑定引擎
  • 拆箱陷阱
  • 带你攀顶云端高级认证,有这回事?
  • Tomcat7 安装使用及jvm连接数参数调优
  • 开发可统计单词个数的Android驱动程序(3)
  • 使用Vitamio打造自己的Android万能播放器(12)—— 播放网络视频缓冲处理
  • 调试工具-gprof
  • 分页插件jquery.pagination.js
  • C#中ref和out的使用小结
  • Cocoa.Programming.for.Mac.OS.X 3rd 前8章小知识点
  • 用apache搭建web服务器
  • android: scrollbarStyle
  • LINQ 关键字
  • Linux 一次性杀死用户所有进程
  • 时间复杂度分析经典问题——最大子序列和
  • Asm.js的简单介绍
  • C++类中的特殊成员函数
  • es6
  • ESLint简单操作
  • JavaScript设计模式系列一:工厂模式
  • JavaScript中的对象个人分享
  • QQ浏览器x5内核的兼容性问题
  • Vue 动态创建 component
  • 翻译 | 老司机带你秒懂内存管理 - 第一部(共三部)
  • 浮现式设计
  • 开发基于以太坊智能合约的DApp
  • 开源SQL-on-Hadoop系统一览
  • 深度学习在携程攻略社区的应用
  • 使用API自动生成工具优化前端工作流
  • 手机端车牌号码键盘的vue组件
  • d²y/dx²; 偏导数问题 请问f1 f2是什么意思
  • 阿里云移动端播放器高级功能介绍
  • ​软考-高级-系统架构设计师教程(清华第2版)【第15章 面向服务架构设计理论与实践(P527~554)-思维导图】​
  • #HarmonyOS:Web组件的使用
  • (13)[Xamarin.Android] 不同分辨率下的图片使用概论
  • (floyd+补集) poj 3275
  • (Matalb时序预测)PSO-BP粒子群算法优化BP神经网络的多维时序回归预测
  • (Redis使用系列) Springboot 使用redis实现接口Api限流 十
  • (ZT) 理解系统底层的概念是多么重要(by趋势科技邹飞)
  • (生成器)yield与(迭代器)generator
  • .NET MVC第五章、模型绑定获取表单数据
  • .NET/C# 中设置当发生某个特定异常时进入断点(不借助 Visual Studio 的纯代码实现)
  • .net项目IIS、VS 附加进程调试
  • .NET项目中存在多个web.config文件时的加载顺序
  • .sh 的运行
  • @JsonSerialize注解的使用
  • @RequestMapping-占位符映射
  • [<死锁专题>]
  • [Android实例] 保持屏幕长亮的两种方法 [转]
  • [BZOJ2208][Jsoi2010]连通数
  • [C#基础知识]专题十三:全面解析对象集合初始化器、匿名类型和隐式类型
  • [c]统计数字
  • [caffe(二)]Python加载训练caffe模型并进行测试1
  • [docker]docker网络-直接路由模式