首页 > 大数据平台 > storm > 安装storm
2016
03-03

安装storm

安装storm 前要先安装好zookeeper 我的是hadoop 环境 上面zookeeper集群都安装好了的
就直接安装storm了

先安装Storm依赖库 我都是下载最新的包
安装ZMQ

wget http://download.zeromq.org/zeromq-4.1.4.tar.gz
 
tar xvf zeromq-4.1.4.tar.gz
cd zeromq
./configure
 
 
configure: error: Package requirements (libsodium) were not met:

No package ‘libsodium’ found
报了个错误,提示没有libsodium 这个库
安装个试下

wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.8.tar.gz
tar xvf libsodium-1.0.8.tar.gz
cd libsodium
./configure
make && make install

安装好后还是报这个错误,看了下 这个包的功能 ibsodium 是一个流行、易于使用的软件库。主要用于加密、解密、签名和生成密码哈希等等 我可以不使用这个功能,先屏蔽这个库好了

cd zeromq
./configure --without-libsodium
make && make install

安装JZMQ

git clone https://github.com/nathanmarz/jzmq.git
cd jzmq
# ./autogen.sh 
autogen.sh: error: could not find libtool.  libtool is required to run autogen.sh.

缺少libtool 给安装下

 yum -y install libtool*

再执行

# ./autogen.sh
#./configure --with-pgm
#make && make install

报错:configure: error: cannot find zmq.h
export LDFLAGS=-L/usr/local/lib
export CPPFLAGS=-I/usr/local/include/
再执行./configure 没报错 make的时候报错
make[1]: Entering directory `/tmp/jzmq/src’
make[1]: *** No rule to make target `classdist_noinst.stamp’, needed by `org/zeromq/ZMQ.class’. Stop.
make[1]: Leaving directory `/tmp/jzmq/src’
make: *** [all-recursive] Error 1
解决办法touch src/classdist_noinst.stamp
make[1]: *** No rule to make target `org/zeromq/ZMQ$Context.class’, needed by `all’. Stop.
make[1]: Leaving directory `/tmp/jzmq/src’
make: *** [all-recursive] Error 1
解决办法touch src/org/zeromq/ZMQ$Context.class
Error: Could not find class file for ‘org.zeromq.ZMQ’.
make[1]: *** [org_zeromq_ZMQ.h] Error 1
make[1]: Leaving directory `/tmp/jzmq/src’
make: *** [all-recursive] Error 1
解决办法
cd src
javac -d . org/zeromq/*.java
cd ..
make && make install

下载storm

wget http://mirrors.cnnic.cn/apache/storm/apache-storm-0.9.5/apache-storm-0.9.5.tar.gz
tar xvf apache-storm-0.9.5.tar.gz
mv apache-storm-0.9.5 /usr/local/storm
vim /usr/local/storm/conf/storm.yaml
storm.zookeeper.servers:
     - "192.168.7.244"
     - "192.168.7.232"
     - "192.168.7.237"
     - "192.168.7.246"
storm.zookeeper.port: 2181
storm.local.dir: "/data/sdb/storm/workdir" 
nimbus.host: "192.168.7.244"
supervisor.slots.ports:
    - 6700
    - 6701
    - 6702
    - 6703
 
 
ui.port: 9090
drpc.servers:
     - "192.168.7.244"
     - "192.168.7.232"
     - "192.168.7.237"
     - "192.168.7.246"

先就基本配置启动试下,因为我上面有spark把8080占用了 所以把UI改成了9090

在Nimbus节点上启动nimbus ui ui必须启动在nimbus节点上,否则UI无法正常工作,因为UI进程会检查本机是否存在Nimbus链接

# nohup /usr/local/storm/bin/storm nimbus >/dev/null 2>&1 &
# nohup /usr/local/storm/bin/storm ui >/dev/null 2>&1 &

到另外3台Supervisor节点启动

# nohup /usr/local/storm/bin/storm supervisor >/dev/null 2>&1 &

可以通过http://192.168.7.244:9090/index.html 查看基本信息

可以参考http://sofar.blog.51cto.com/353572/1530424
这有详细配置storm.yaml

最后编辑:
作者:saunix
大型互联网公司linux系统运维攻城狮,专门担当消防员

留下一个回复