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. C# 与JAVA 的RSA 加密解密交互,互通,C#使用BouncyCastle来实现私钥加密,公钥解密的方法

    因为C#的RSA加密解密只有公钥加密,私钥解密,没有私钥加密,公钥解密.在网上查了很久也没有很好的实现.BouncyCastle的文档少之又少.很多人可能会说,C#也是可以的,通过Biginteger ...

  2. 第二周:If判断语句程序当中的作用简介

    1.If语句的作用: 在我们编写程序时经常会遇到内容判断的问题,比如判断内容的真假或者值的大小分别输出内容的问题 这时就会用到我们的If判断语句了,顾名思义,if在英文单词中意思为如果,在Java中他 ...

  3. 如何去除My97 DatePicker控件上右键弹出官网的链接

    http://my97.net/dp/My97DatePicker/calendar.js?最后结尾处: 这个就是官网链接地址了. 然后查找 net,nte,ent,etn,ten,tne最终找到了“ ...

  4. Liunx 常用命令

    Liunx 常用命令================================================================================ 1. 远程拷贝文件 ...

  5. java socket 通讯

    (转)http://blog.csdn.net/xn4545945/article/details/8098646

  6. Win10光驱不见了

    1. 网上教程试了很多,如下: http://jingyan.baidu.com/article/02027811656a8b1bcd9ce570.html http://jingyan.todgo. ...

  7. leetcode-【中等题】5. Longest Palindromic Substring

    题目 Given a string S, find the longest palindromic substring in S. You may assume that the maximum le ...

  8. 关于iOS10的允许访问用户数据产生的问题

    不知道这个问题是什么时候出现的,直到我重写项目已应对IPv6的审核. 先前没有加引导页面,打开app直接进入主控制器.当弹出允许访问用户数据窗口的时候,主页面的数据是不加载的. 当用户未允许访问数据之 ...

  9. NET 强签名

    强签名: 1. 可以将强签名的dll注册到GAC,不同的应用程序可以共享同一dll. 2. 强签名的库,或者应用程序只能引用强签名的dll,不能引用未强签名的dll,但是未强签名的dll可以引用强签名 ...

  10. android开发--数据库(更新或者降低版本)

    Andoird的SQLiteOpenHelper类中有一个onUpgrade方法. 1. 帮助文档里说的"数据库升级"是指什么? 你开发了一个应用,当前是1.0版本.该程序用到了数 ...