Home > Database > Mysql Tutorial > CentOS6.4下Storm0.9.2单机版安装

CentOS6.4下Storm0.9.2单机版安装

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:48:32
Original
1201 people have browsed it

参考博客:《Storm0.9-single》(http://www.cnblogs.com/really-dt/p/3775663.html),感谢。 0.安装依赖包 yum install uuid*yum install libtoolyum install libuuidyum install libuuid-devel 不然安装过程会提示错误。 1.安装zeromq 从http://download.z

参考博客:《Storm0.9-single》(http://www.cnblogs.com/really-dt/p/3775663.html),感谢。


0.安装依赖包

yum install uuid*
yum install libtool
yum install libuuid
yum install libuuid-devel
Copy after login

不然安装过程会提示错误。

1.安装zeromq

从http://download.zeromq.org/下载最新的zeromq-4.0.4.tar.gz。

tar -zxvf zeromq-4.0.4.tar.gz
cd zeromq-4.0.4
./configure
make
make install
Copy after login


2.安装jzmq

git clone git://github.com/nathanmarz/jzmq.git
cd jzmq/
./autogen.sh
./configure
make
make install
Copy after login


3.安装zookeeper

从http://zookeeper.apache.org/releases.html下载最新的zookeeper-3.4.6.tar.gz.如果出现JAVA_HOME配置问题,需检查jdk的环境变量,比如我的是CentOS中的openjdk,没有在/etc/profile中配置,自己添加信息。

tar -zxvf zookeeper-3.4.6.tar.gz
sudo cp zookeeper-3.4.6 /usr/local/
vim ~/.bashrc
export ZOOKEEPER_HOME=/usr/local/zookeeper-3.4.6
export PATH=$PATH:$ZOOKEEPER_HOME/bin
source ~/.bashrc
Copy after login
Copy after login

4.安装storm

从http://storm.incubator.apache.org/downloads.html下载最新的apache-storm-0.9.2-incubating.tar.gz.

tar -zxvf apache-storm-0.9.2-incubating.tar.gz
sudo cp apache-storm-0.9.2-incubating /usr/local/
vim ~/.bashrc
export STORM_HOME=/usr/local/apache-storm-0.9.2-incubating
export PATH=$PATH:$STORM_HOME/bin
source ~/.bashrc
Copy after login
再配置storm:
vim ./conf/storm.yaml (注意yaml格式的要求,空格tab,:和-前后都有空格)
Copy after login

文件中的内容修改为
storm.zookeeper.servers:
        - "localhost"
storm.zookeeper.port : 2181
nimbus.host : "localhost"
storm.local.dir : "/usr/local/apache-storm-0.9.2-incubating/tmp"
supervisor.slots.ports:
  - 6700
  - 6701
  - 6702
Copy after login
storm.local.dir 中的tmp文件夹不存在则自己创建。


5.测试用例

从github上获取storm-starter测试代码.

git clone https://github.com/nathanmarz/storm-starter.git
cd storm-starter/
mvn -f m2-pom.xml package(需要安装maven)
Copy after login
下面依次启动服务:

启动zookeeper(zookeeper/bin目录下)。启动时可能出现错误:zookeeper-3.4.6/bin/../conf/zoo.cfg 文件不存在,直接mv zoo_sample.cfg zoo.cfg即可。

./zkServer.sh start
Copy after login


启动storm

storm nimbus
storm supervisor
storm ui 
Copy after login

提交Topology(storm-starter目录下)

[不带Topology名提交Topology,这中情况不会提交到nimbus去运行]

storm jar target/storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar storm.starter.WordCountTopology 
Copy after login

[提交Topology]

storm jar ../storm-starter/target/storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar storm.starter.WordCountTopology myFirstStormApp
Copy after login

此时就可以通过Web界面查看了http://localhost:8080/

storm list 查看当前运行的Topology

可在storm目录下的logs下查看日志文件,包含nimbus.log<code>supervisor.log<code>,各个worker.log.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template