搭建zmq时的问题
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
安装jzmq问题:
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
完整安装过程:
(1)准备工作:
修改/etc/hosts文件,添加zookeeper群对应ip和hostname
安装zookeeper
安装uuid-dev
安装pkg-config
安装git git clone https://github.com/nathanmarz/jzmq.git
安装wget wget http://download.zeromq.org/zeromq-2.1.7.tar.gz
安装unzip
安装包:
(2)解压zmq包安装zmq:先安装zmq再安装jzmq
tar zvxf zeromq.tar.gz
./configure
make
sudo make install或者root下make install
(3)安装jzmq:
./autogen.sh
./configure
make
sudo make install
(4)安装Python
tar –jxvf Python-2.6.6.tar.bz2
cd Python-2.6.6
./configure
make
sudo make install
(5)安装storm:
unzip storm.zip
修改conf文件夹下的storm .yaml文件
添加如下数据:
(注意这些属性前要加空格,另外冒号后边也要加空格,有个帖子这么说的) 空格storm.zookeeper.servers: (这里还是用hostname替代最好,万一ip变了的话只要修改hosts文件就行了,zookeeper搭建时也用hostname代替具体的IP地址)
- "59.64.125.201"
- "xx.xx.xx.xx"
空格storm.local.dir:空格 "/home/server/storm/workdir" (这个文件夹要自己创建好)每次重启最好清空workdir这个文件夹里的内容不然各种错误
还要注意端口问题,别让它们冲突了
空格nimbus.host:空格 "nimbus节点的IP"
空格supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
(6)启动storm:
首先集群各节点(事实上不用各节点都安装zookeeper,zookeeper也不一定需要和storn公用一个集群)必须启动zookeeper,在每个机器上运行:
zkServer.sh start
在nimbus节点运行:
nohup ./storm nimbus &
在supervisor节点运行:
nohup ./storm supervisor&
在nimbus节点启动storm自带的监控:
nohup ./storm ui &
在nimbus节点的浏览器输入 http://nimbus的IP:8080/ 显示机群运行状态
zkServer.sh start
在nimbus节点运行:
nohup ./storm nimbus &
在supervisor节点运行:
nohup ./storm supervisor&
在nimbus节点启动storm自带的监控:
nohup ./storm ui &
在nimbus节点的浏览器输入 http://nimbus的IP:8080/ 显示机群运行状态
提交任务的话要这样提交(程序不需要打包成可运行jar ,普通jar包就可以)
./storm jar storm-proj.jar storm.Toplogy
./storm jar jar包名 工程package路径 工程主类名
./storm kill storm_test(这是拓扑里面定的拓扑名不是工程名称)
如下图所示:
本文将引导读者逐步了解Storm流式计算的基本概念和应用场景。从安装配置到创建第一个拓扑,深入浅出地解析Storm的工作原理,为后续的流处理开发奠定基础。
1867

被折叠的 条评论
为什么被折叠?



