storm的搭建(单机版)

写下搭建测试用的storm环境步骤:

一、系统

Redhat6.5_x86

二、所需软件包

jdk-7u67-linux-x64.tar.gz

jzmq-master.zip

storm-0.7.1.zip

zeromq-2.1.7.zip

zookeeper-3.3.5.tar.gz

三、搭建步骤(默认的python2.6.6):

1、jdk的安装

tar zxf jdk-7u67-linux-x64.tar.gz -C /usr/local/services

cd /usr/local/services

ln -sf jdk1.7.0_67 jdk

vim /etc/profile

export JAVA_HOME=/usr/local/services/jdk

export PATH=$PATH:$JAVA_HOME/bin

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

source /etc/profile

java测试一下jdk是否安装OK


2、zookeeper的安装

tar zxf zookeeper-3.3.5.tar.gz -C /usr/local/services/

cd /usr/local/services

ln -sf zookeeper-3.3.5 zookeeper


vim /etc/profile

export ZOOKEEPER_HOME=/usr/local/services/zookeeper

export PATH=$PATH:$ZOOKEEPER_HOME/bin


cp conf/zoo_sample.cfg conf/zoo.cfg

vim conf/zoo.cfg

dataDir=/usr/local/services/zookeeper/data

dataLogDir=/usr/local/services/zookeeper/log


vim bin/zkEnv.sh

ZOO_LOG_DIR="/usr/local/services/zookeeper/log"


./bin/zkServer.sh start  启动zookeeper

./bin/zkServer.sh status  查看zookeeper的状态


3、storm的安装

在安装storm之前,先安装storm依赖的包jzmq-master.zipzeromq-2.1.7.zip


storm的依赖包是依赖这几个工具,为了避免报错,可以先装上

yum -y install gcc* e2fsprogs* libuuid* libtool*


unzip zeromq-2.1.7.zip

cd zeromq-2.1.7

./configure --prefix=/usr/local/services/

make&&make install

ldconfig -v


unzip jzmq-master.zip

cd jzmq-master.zip

./autogen.sh

./configure --prefix=/usr/local/services/  --with-zeromq=PREFIX

make&&make install 


unzip storm-0.7.1.zip

mv storm-0.7.1 /usr/local/services/storm-0.7.1

ln -sf storm-0.7.1 storm


vim /etc/profile

export STORM_HOME=/usr/local/services/storm

export PATH=$PATH:$STORM_HOME/bin


source /etc/profile


vim conf/storm.yaml

 nimbus.host: "localhost"

 storm.local.dir: "/usr/local/services/storm/data"

 storm.zookeeper.servers:

     - "localhost"

 storm.zookeeper.port: 2181


vim log4j/storm.log.properties

log4j.appender.A1.File = /usr/local/services/storm/logs/${logfile.name}


启动storm

storm nimbus&

storm supervisor&

storm ui&


jps查看下状态





 


你可能感兴趣的:(storm)