Here's a summary of the steps for setting up a Storm cluster:

Set up a Zookeeper cluster
Install dependencies on Nimbus and worker machines
Download and extract a Storm release to Nimbus and worker machines
Fill in mandatory configurations into storm.yaml
Launch daemons under supervision using "storm" script and a supervisor of your choice

1 基本环境

操作系统:CentOS-6.5-x86_64-bin-DVD1

  JDK:java version "1.7.0_67"

2 安装ZOOKEEPER-3.4.6

http://www.cnblogs.com/fesh/p/3900253.html

3 安装Storm依赖库(ZeroMQ、JZMQ、Python)

3.1 安装ZEROMQ-4.0.5

tar -zxvf zeromq-4.0..tar.gz
cd zeromq-4.0.
./configure
make
make install

3.2 安装JZMQ

git clone https://github.com/nathanmarz/jzmq.git
./autogen.sh
./configure
make
make install

3.3 安装PYTHON-3.4.2

./configure
make
make test
sudo make install

测试

python -V

4 配置STORM-0.9.3

配置$STORM_HOME/conf/storm.yaml
1) storm.zookeeper.servers:This is a list of the hosts in the Zookeeper cluster for your Storm cluster. It should look something like:

storm.zookeeper.servers:
- "111.222.333.444"
- "555.666.777.888"

如果Zookeeper集群使用的不是默认端口,那么还需要设置storm.zookeeper.port选项。

2) 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.local.dir: "/mnt/storm"

3) nimbus.host:The worker nodes need to know which machine is the master in order to download topology jars and confs.

nimbus.host: "111.222.333.44"

4) 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.

supervisor.slots.ports:
-
-
-
-

设置完成后,scp -r storm cluster2:/opt/ 将文件分发到其他集群。

5 启动STORM集群

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://{nimbus host}:8080.

启动Nimbus后台程序:

storm nimbus&

启动Supervisor后台程序:

storm supervisor& 

6 向集群提交任务

1)启动Storm Topology

storm jar allmycode.jar org.me.MyTopology arg1 arg2 arg3

2)停止Storm Topology

storm kill {toponame}

其中,{toponame}为Topology提交到Storm集群时指定的Topology任务名称。

参考:

1、http://www.cnblogs.com/panfeng412/archive/2012/11/30/how-to-install-and-deploy-storm-cluster.html

2、http://storm.apache.org/documentation/Setting-up-a-Storm-cluster.html

在CentOS上搭建Storm集群的更多相关文章

  1. 手把手教你在CentOS上搭建Kubernetes集群

    作者:ChamPly 安装CentOS 1.安装net-tools [root@localhost ~]# yum install -y net-tools 2.关闭firewalld [root@l ...

  2. 在CentOS上安装ZooKeeper集群

    一共准备3个CentOS虚拟机 172.16.9.194 172.16.9.195 172.16.9.196 上传zookeeper-3.3.6.tar.gz到服务器并解压,3台服务器的目录结构如下 ...

  3. nginx的简单使用和使用nginx在windows上搭建tomcat集群

    nginx是一款轻量级的web服务器,常用的作用为服务器/反向代理服务器以及电子邮件(IMAP/POP3)代理服务器 1.为什么我们要使用Nginx? 反向代理: 反向代理(Reverse Proxy ...

  4. 在windows上搭建redis集群

    一 所需软件 Redis.Ruby语言运行环境.Redis的Ruby驱动redis-xxxx.gem.创建Redis集群的工具redis-trib.rb 二 安装配置redis redis下载地址   ...

  5. 如何在CentOS上创建Kubernetes集群

    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由编程男孩 发表于云+社区专栏 介绍 Kubernetes(常简称为K8s)是用于自动部署.扩展和管理容器化(containerized ...

  6. Azure上搭建ActiveMQ集群-基于ZooKeeper配置ActiveMQ高可用性集群

    ActiveMQ从5.9.0版本开始,集群实现方式取消了传统的Master-Slave方式,增加了基于ZooKeeper+LevelDB的实现方式. 本文主要介绍了在Windows环境下配置基于Zoo ...

  7. Kubernetes-在Kubernetes集群上搭建HBase集群

    经过3天的努力,终于在Kubernetes上把HBase集群搭建起来了,搭建步骤如下. 创建HBase镜像   配置文件包含core-site.xml.hbase-site.xml.hdfs-site ...

  8. CentOS 7 搭建 Ceph 集群(nautilus 版本)

    搭建 Ceph 分布式集群( nautilus 版本 ) 一.服务器环境说明 主机名 角色 IP地址 ceph-admin ceph-deploy 192.168.92.21 ceph-node1 m ...

  9. centos下搭建redis集群

    必备的工具: redis-3.0.0.tar redis-3.0.0.gem   (ruby和redis接口) 分析:     首先,集群数需要基数,这里搭建一个简单的redis集群(6个redis实 ...

随机推荐

  1. JS toFixed 四舍六入五成双

    以前一直以为toFixed就是四舍五入的方法,后来又有一段时间以为toFixed是五舍六入.今天终于写的时候,终于才知道toFixed是一个叫做四舍六入无成双的诡异的方法... 完全不明白为什么要这么 ...

  2. AX 2012 两种lookup 的显示方式

    第一种:只能单选的lookup: 代码: public void BusinessUnitLookup(FormStringControl _formstrcontroll) { //OMOperat ...

  3. system verilog中的跳转操作

    在verilog中,使用disable声明来从执行流程中的某一点跳转到另一点.特别地,disable声明使执行流程跳转到标注名字的声明组末尾,或者一个任务的末尾. verilog中的disable命令 ...

  4. SSH in Python

    需要安装paramiko,paramiko需要PyCrypto , PyCrypto 需要GCC编译. 安装PyCrypto: 安装Mingw32,确认环境变量. 下载并编译PyCrypto - se ...

  5. RestoreDirectory 引起的BUG

    IIRC, in windows XP when you press Save on a SaveFileDialog (or Open on a OpenFileDialog) the direct ...

  6. Linux安装MySql.Data for mono

    wget http://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-6.8.3-noinstall.zipunzip m ...

  7. 《JavaScript高级程序设计》学习笔记(3)——变量、作用域和内存问题

    欢迎关注本人的微信公众号"前端小填填",专注前端技术的基础和项目开发的学习. 本节内容对应<JavaScript高级程序设计>的第四章内容. 1.函数:通过函数可以封装 ...

  8. linux命令小常识

    作为一个tester我们必须要会linux,也许你会说不用也可以.那么我想问,你部署测试环境在哪里,你下载war包并部署war包呢,你看日志在哪里? 基于测试需要用到liunx,我这里只针对需要用到的 ...

  9. 将对象的所有属性名放到一个数组中 || 获得对象的所有属性名 || return;不具有原子性 || 怎样自己制作异常|| 判断对象有没有某个属性 || 当传递的参数比需要的参数少的时候,没有的值会被赋予undefined || 获得函数实际传递的参数 || 怎么用函数处理一个对象 || 用一个名字空间定义一个模块所有的函数 || 给一个对象添加方法

    获得对象的所有属性名 || 将对象o的所有属性名放到数组中 var o = {x:1,y:2,z:3}; var arr = []; var i = 0; for(arr[i++] in o){};/ ...

  10. sql server2008安装说明 详细完整版

    SQL Server 2008是一个重大的产品版本,它推出了许多新的特性和关键的改进,使得它成为至今为止的最强大和最全面的SQL Server版本. 在现今数据的世界里,公司要获得成功和不断发展,他们 ...