1:Storm作为一个实时处理的框架,产生的消息需要快速的进行处理,比如存在消息队列ZeroMQ里面。 由于消息队列ZeroMQ是C++写的,而我们的程序是运行在JVM虚拟机里面的。所以需要jzmq这个桥梁来黏合C++程序接口和Java程序接口。

ZeroMQ的官方网址:http://zeromq.org/

1:MetaQ(全称Metamorphosis)是一个高性能、高可用、可扩展的分布式消息中间件,思路起源于LinkedIn的Kafka,但并不是Kafka的一个Copy。MetaQ具有消息存储顺序写、吞吐量大和支持本地和XA事务等特性,适用于大吞吐量、顺序消息、广播和日志数据传输等场景,目前在淘宝和支付宝有着广泛的应用。
2:MetaQ概念
  Producer (消息生产者)
  Consumer (消息消费者)
  Topic (消息的主题)
  Partition (分区)
  Message (消息)
  Broker (就是meta的服务端)
  Group (消费者分组)
  Offset (消息偏移量)
3:下载地址 http://fnil.net
  GitHub地址 https://github.com/killme2008/Metamorphosis

2:ZeroMQ的安装过程如下所示(首先将zeromq-2.1.7.tar.gz上传到自己的虚拟机里面,过程省略):

然后进行解压缩操作,如下所示:

[root@slaver1 package]# tar -zxvf zeromq-2.1..tar.gz -C /home/hadoop/soft/

解压缩以后,由于解压缩以后是源码,所以需要编译,编译以后再进行安装操作:

然后使用此命令对编译环境进行检测:

[root@slaver1 zeromq-2.1.]# ./configure

然后出现如下错误,没有找到C++编译器,所以现在安装C++编译器:

 checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... (cached) gawk
checking for xmlto... no
checking for asciidoc... no
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... (cached) /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc -std=gnu99... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments...
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) no
checking whether g++ accepts -g... (cached) no
checking dependency style of g++... (cached) none
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... no
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether the C compiler works... yes
checking whether we are using Intel C compiler... no
checking whether we are using Sun Studio C compiler... no
checking whether we are using clang C compiler... no
checking whether we are using gcc >= C compiler... yes
checking whether the C++ compiler works... no
configure: error: Unable to find a working C++ compiler

安装C++编译器,如果有网络的话,可以使用yum进行安装,如果没有网络需要提前下载好,由于前段时间重装系统了,所有都是从头开始,你懂的,然后我的网络又坏了,日了狗了,我的问题是,本机可以ping通虚拟机,但是虚拟机ping不通本地,很显然就是DNS出现问题了,那么说一下我是如何解决的:

然后呢,配置一下自己的虚拟机的网络编辑器,本机NET模式的DNS和虚拟机的NET模式的DNS要一致:

可以上网的情况下:

[root@slaver1 hadoop]# yum install gcc-c++

离线安装如下所示:

rpm -i libstdc++-devel-4.4.-.el6.x86_64.rpm
rpm -i gcc-c++-4.4.-.el6.x86_64.rpm
rpm -i libuuid-devel-2.17.-12.9.el6.x86_64.rpm

然后呢,再去zeroMQ目录下面对编译环境进行检测:

[root@slaver1 zeromq-2.1.]# ./configure

然后呢,出现如下所示的问题,最后一行如下所示的问题,这是需要一些依赖,所以接下来解决这个问题:

configure: error: cannot link with -luuid, install uuid-dev.

手动安装这个依赖,解决问题,解决完问题再去ZeroMQ目录下面检测环境正常即可:

 [root@slaver1 rpms-]# rpm -ivh libuuid-devel-2.17.-12.9.el6.i686.rpm
Preparing... ########################################### [%]
:libuuid-devel ########################################### [%]

如果正常,最后一行如下所示:

config.status: executing libtool commands

然后开始进行编译操作,如下所示,在ZeroMQ目录下面输入make命令,进行编译操作:

[root@slaver1 zeromq-2.1.]# make

编译以后进行安装,如下所示,在ZeroMQ目录下面输入make install命令,进行安装操作:

[root@slaver1 zeromq-2.1.]# make install

至此ZeroMQ安装结束,接下来安装 jzmq(Java调用C++的桥梁),如下所示:

[root@slaver1 package]# unzip jzmq-master.zip -d /home/hadoop/soft/

然后生成configure命令。操作如下所示,会提示你缺少libtool这个包,然后现在安装一下这个包:

[root@slaver1 jzmq-master]# ./autogen.sh
autogen.sh: error: could not find libtool. libtool is required to run autogen.sh.

然后呢,安装libtool出现的问题以及解决方法如下所示:

 [root@slaver1 rpms-]# rpm -ivh libtool-2.2.-15.5.el6.i686.rpm
error: Failed dependencies:
autoconf >= 2.58 is needed by libtool-2.2.-15.5.el6.i686
automake >= 1.4 is needed by libtool-2.2.-15.5.el6.i686
[root@slaver1 rpms-]# rpm -ivh autoconf-2.63-5.1.el6.noarch.rpm
Preparing... ########################################### [%]
:autoconf ########################################### [%]
[root@slaver1 rpms-]# rpm -ivh automake-1.11.-.el6.noarch.rpm
Preparing... ########################################### [%]
:automake ########################################### [%]
[root@slaver1 rpms-]# rpm -ivh libtool-2.2.-15.5.el6.i686.rpm
Preparing... ########################################### [%]
:libtool ########################################### [%]
[root@slaver1 rpms-]#

然后呢,再去jzmq目录下面运行如下脚本生成configure命令:

[root@slaver1 jzmq-master]# ./autogen.sh

然后使用configure命令对编译环境进行检测:

[root@slaver1 jzmq-master]# ./configure

然后进行编译操作,如下所示:

[root@slaver1 jzmq-master]# make

然后进行安装操作,如下所示:

[root@slaver1 jzmq-master]# make install

3:由于Storm的脚本是Python写的,所以需要安装一下Python这个运行环境,又因为Centos6.4版本已经安装了python,所以就不需要进行安装了哦:

[root@slaver1 jzmq-master]# which python
/usr/bin/python

查看python的版本,如下所示:

[root@slaver1 jzmq-master]# python -V
Python 2.6.

4:然后呢,开始安装Storm,由于之前写过了,这里就不再叙述了;

待续......

zeromq的安装,部署(号称最快的消息队列,消息中间件)的更多相关文章

  1. ZeroMQ,史上最快的消息队列

    一.ZMQ 是什么 阅读了 ZMQ 的 Guide 文档后,我的理解是,这是个类似于 Socket 的一系列接口,他跟 Socket 的区别是:普通的 socket 是端到端的(1:1的关系),而 Z ...

  2. 谁才是最快的消息队列:ActiveMQ, RabbitMQ[转]

    Lately I performed a message queue benchmark, comparing several queuing frameworks (RabbitMQ, Active ...

  3. OpenStack安装部署(二)

    中文文档:http://docs.openstack.org/mitaka/zh_CN/install-guide-rdo/提示:这个中文文档是直接翻译过来的,所以会有很多不通顺的地方. 服务介绍 M ...

  4. 消息队列&Celery&RabbitMQ&zeromq

    一.消息队列 什么是消息队列? “消息队列”是在消息的传输过程中保存消息的容器. “消息”是在两台计算机间传送的数据单位.消息可以非常简单,例如只包含文本字符串:也可以更复杂,可能包含嵌入对象. 消息 ...

  5. 消息队列库——ZeroMQ

    消息队列库——ZeroMQ ZeroMQ(简称ZMQ)是一个基于消息队列的多线程网络库,其对套接字类型.连接处理.帧.甚至路由的底层细节进行抽象,提供跨越多种传输协议的套接字. ZMQ是网络通信中新的 ...

  6. Storm-0.9.0.1安装部署 指导

    可以带着下面问题来阅读本文章: 1.Storm只支持什么传输 2.通过什么配置,可以更改Zookeeper默认端口 3.Storm UI必须和Storm Nimbus部署在同一台机器上,UI无法正常工 ...

  7. Spark介绍及安装部署

    一.Spark介绍 1.1 Apache Spark Apache Spark是一个围绕速度.易用性和复杂分析构建的大数据处理框架(没有数据存储).最初在2009年由加州大学伯克利分校的AMPLab开 ...

  8. Storm集群安装部署步骤【详细版】

    作者: 大圆那些事 | 文章可以转载,请以超链接形式标明文章原始出处和作者信息 网址: http://www.cnblogs.com/panfeng412/archive/2012/11/30/how ...

  9. centos6.5kvm虚拟化安装部署

    一.走进云计算 云计算:云计算是一种按使用量付费的模式,这种模式提供可用的.便捷的.按需的网络访问, 进入可配置的计算资源共享池(资源包括网络,服务器,存储,应用软件,服务),这些资源能够被快速提供, ...

随机推荐

  1. FAT文件系统规范v1.03学习笔记---2.FAT区之FAT数据结构(Fat Data Structure)

    1.前言 本文主要是对Microsoft Extensible Firmware Initiative FAT32 File System Specification中文翻译版的学习笔记. 每个FAT ...

  2. window10 matlabR2015b 安装minGw

    第一步:下载TDM-GCC(注意看清是32位还是64位),TDM-GCC的安装路径不要包括空格: http://tdm-gcc.tdragon.net/download 第二步:点击“我的电脑”右键“ ...

  3. vc++高级班之窗口篇[4]---让程序只运行一个实例

      大家都看过或者使用过类似只运行一个实例的程序,比如:QQ游戏.部分浏览器 等等! 让一个程序只运行一个实例的方法有多种,但是原理都类似,也就是在程序创建后,有窗口的程序在窗口创建前, 检查系统中是 ...

  4. LaTeX公式中的空格

    两个quad空格 a \qquad b 两个m的宽度 quad空格 a \quad b 一个m的宽度 大空格 a\ b 1/3m宽度 中等空格 a\;b 2/7m宽度 小空格 a\,b 1/6m宽度 ...

  5. LVM初级配置

    步骤: 1.将物理硬盘转换成物理卷(PV) 创建PV:pvcreate /dev/vdb 2.将PV添加到卷组中(VG) vgcreate vg0 /dev/vdb 3.创建逻辑卷(LV)并从VG中调 ...

  6. 14)django-模板(计数器)

    模块中for循环自带计数器. 使用场景:表格数据相增加序列号. 问:可以使用表的自增加序列做为序列号,但是这个存在个问题,即表中数据被删除,则会出现序列不连续. 1)每个循环都有6个公共方法,双循环有 ...

  7. Linux 的 OOM 终结者(Out Of Memory killer)

    现在是早晨6点钟.已经醒来的我正在总结到底是什么事情使得我的起床闹铃提前了这么多.故事刚开始的时候,手机铃声恰好停止.又困又烦躁的我看了下手机,看看是不是我自己疯了把闹钟调得这么早,居然是早晨5点.然 ...

  8. 本地http://localhost打不开怎么办

    本地http://localhost打不开怎么办 出自:http://jingyan.baidu.com/article/c45ad29cebb95a051753e2b6.html 学过计算机的都知道 ...

  9. Android:四大架构的优缺点,你真的了解吗?

    声明|转载于作者:KunMinX原文链接:https://www.jianshu.com/p/9ef813d5c1af 前言 前不久刚结束对 20 模块项目的第 3 轮重构,一路见证 MVC.MVP. ...

  10. linux 下创建共享文件夹

    首先需要在win下共享一个盘 然后设置virtulbox 然后修改一串代码 参考原文 https://jingyan.baidu.com/article/2fb0ba40541a5900f2ec5f0 ...