今天我们只讲storm的安装:
先安装JDK,教程地址:http://blog.csdn.net/w3045872817/article/details/77113539
在安装zookeeper,教程地址:http://blog.csdn.net/w3045872817/article/details/77113620
安装storm需要的依赖库:
安装zeromq:
下载zeromq:http://download.csdn.net/download/w3045872817/9930109
解压:tar -zxvf filename
执行以下步骤:
cd filename
./configure
make
sudo make install
./configure 生成makefile 如果报错(sudo apt-get install g++;sudo apt-get install libuuid-devel)
安装jzmq:
下载jzmq:http://download.csdn.net/download/w3045872817/9930113
解压
执行以下步骤:
./autogen.sh
./configure
sudo make
sudo make install
A.注意事项:执行./autogen.sh时出现
1.报错:autogen.sh: error: could not find pkg-config. pkg-config is required to run autogen.sh.
执行sudo apt-get install pkg-config,在执行/autogen.sh
2.报错:autogen.sh: error: could not find libtool. libtool is required to run autogen.sh
执行sudo apt-get install libtool-bin;
sudo apt-get install libtool,在执行/autogen.sh
3.报错:autogen.sh:error: could not find autoreconf. autoconf and automake are required to runautogen.sh
执行sudo apt-get install autoreconf*,在执行/autogen.sh
B.注意事项:执行make时出现
报错:
spark@spark03:~/app/storm_depend/jzmq$ sudo make
Making all in src
make[1]: Entering directory '/home/spark/app/storm_depend/jzmq/src'
make[1]: *** No rule to make target 'classdist_noinst.stamp', needed by 'org/zeromq/ZMQ.class'. Stop.
make[1]: Leaving directory '/home/spark/app/storm_depend/jzmq/src'
Makefile:399: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
执行命令:touch src/classdist_noinst.stamp 文件,在执行sudo make
2.报错:
make[1]: *** No rule to make target 'org/zeromq/ZMQ$Context.class', needed by 'all'. Stop.
make[1]: Leaving directory '/home/spark/app/storm_depend/jzmq/src'
Makefile:399: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
执行命令:cd src/org/zeromq/
javac *.java
cd ../../..
安装python:
下载:http://download.csdn.net/download/w3045872817/9930584
解压:
执行以下步骤:
./configure
make
sudo make
输入python -V,检查是否安装成功
================================================================
现在开始安装storm:
下载:http://storm.apache.org/downloads.html
解压:
执行以下步骤:
vim conf/storm.yaml
输入以下内容
########### These MUST be filled infor a storm configuration
storm.zookeeper.servers:
- "192.168.19.150"
nimbus.host: "192.168.19.150"
storm.local.dir: "/home/spark/app/apache-storm-0.9.7/workdir"
java.library.path: "/home/spark/app/storm_depend"
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
# ##### These may optionally befilled in:
#
## List of custom serializations
# topology.kryo.register:
# - org.mycompany.MyType
# - org.mycompany.MyType2:org.mycompany.MyType2Serializer
#
## List of custom kryo decorators
# topology.kryo.decorators:
# - org.mycompany.MyDecorator
#
## Locations of the drpc servers
drpc.servers:
- "192.168.19.150"
你只需要将ip地址改为你的ip和将java.library.path改为你指定的路径就可以了,还有就是这个单节点
测试:
首先启动zookeeper:
bin/zkServer.sh start
------------------------------
让后启动以下命令:
bin/storm nimbus &
bin/storm ui &
bin/storm supervisor &
------------------------
成功后可以通过
http://ip:8080访问storm,但必须启动ui
如图:
希望能帮到你们!