一、安装Zookeeper
1、设置.profile文件:
export ZOOKEEPER_HOME=/home/hadoop/streamdata/zookeeper-3.4.5-cdh4.5.0
export PATH=$PATH:$ZOOKEEPER_HOME/bin
2、设置zoo.cfg文件:
tickTime=2000 dataDir=/home/hadoop/streamdata/data/zookeeper/ clientPort=2181 initLimit=5 syncLimit=2 server.1=kit-bg1:2888:3888 server.2=kit-bg2:2888:3888 server.3=kit-bg3:2888:3888
3、设置myid文件。分别在各机器的dataDir指定的目录下,创建myid文件,kit-bg1上内容为"1",kit-bg2内容为"2",kit-bg3内容为"3"。
4、命令:
zkServer.sh start 需在各机分别执行
zkServer.sh status
zkServer.sh stop
zkCli.sh 客户端测试
二、安装zeromq-2.1.7
下载解压缩后,执行:
cd zeromq-2.1.7 ./configure make su
make install
问题:
错误: configure: error: no acceptable C compiler found in $PATH
解决:yum -y install gcc
错误: configure: error: Unable to find a working C++ compiler
解决:yum -y install gcc-c++
错误:configure: error: cannot link with -luuid, install uuid-dev.
解决:yum -y install *uuid-devel*
三、安装jzmq
从https://github.com/nathanmarz/jzmq下载源码,执行:
cd jzmq ./autogen.sh ./configure make su
make install
问题:
错误:autogen.sh: error: could not find libtool. libtool is required to run autogen.sh.
解决:yum -y install libtool
四、安装storm
设置.profile文件:
export STORM_HOME=/home/hadoop/streamdata/apache-storm-0.9.1-incubating
export PATH=$PATH:$STORM_HOME/bin
配置storm.yaml文件:
storm.zookeeper.servers:
- "kit-bg1"
- "kit-bg2"
- "kit-bg3"storm.local.dir: "/home/hadoop/streamdata/data/storm"
nimbus.host: "kit-bg1"
ui.port: 18080
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
启动服务:
storm nimbus&
storm supervisor&
storm ui&
storm nimbus&命令仅需master上执行。