1.安装zk
2.安装python(一般linux自带无须安装)
3.安装zeromq
# wget http://download.zeromq.org/historic/zeromq-2.1.7.tar.gz
# tar zxf zeromq-2.1.7.tar.gz
# cd zeromq-2.1.7
# ./configure
# make
# sudo make install
**********************
如果报错
configure: error: in `/usr/local/download/zeromq-2.1.7':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
原因为没有安装c compiler
解决方法
# yum install gcc*
如果遇到Error:cannot link with -luuid, install uuid-dev
原因为缺少uuid相关package
解决方法
# yum install uuid*
# yum install e2fsprogs*
# yum install libuuid*
**********************
4.安装jzmq
git clone https://github.com/nathanmarz/jzmq.git
cd jzmq
./autogen.sh
./configure
make
sudo make install
**********************
要先安装git 如未安装: yun install git
如果报错
autogen.sh: error: could not find libtool. libtool is required to run autogen.sh.
缺少libtool
# yum install libtool*
5.安装storm
wget https://dl.dropboxusercontent.com/s/tqdpoif32gufapo/storm-0.9.0.1.tar.gz
tar vzxf storm-0.9.0.1.tar.gz
6.修改conf下storm.yaml配置文件
1) storm.zookeeper.servers: Storm集群使用的Zookeeper集群地址,其格式如下:
storm.zookeeper.servers:
- "111.222.333.444"
- "555.666.777.888"
2) storm.local.dir: Nimbus和Supervisor进程用于存储少量状态,如jars、confs等的本地磁盘目录,需要提前创建该目录并给以足够的访问权限。然后在storm.yaml中配置该目录,如:
storm.local.dir: "/home/admin/storm/workdir"
3) java.library.path: Storm使用的本地库(ZMQ和JZMQ)加载路径,默认为"/usr/local/lib:/opt/local/lib:/usr/lib",一般来说ZMQ和JZMQ默认安装在/usr/local/lib 下,因此不需要配置即可。
4) nimbus.host: Storm集群Nimbus机器地址,各个Supervisor工作节点需要知道哪个机器是Nimbus,以便下载Topologies的jars、confs等文件,如:
nimbus.host: "111.222.333.444"
5) supervisor.slots.ports: 对于每个Supervisor工作节点,需要配置该工作节点可以运行的worker数量。每个worker占用一个单独的端口用于接收消息,该配置选项即用于定义哪些端口是可被worker使用的。默认情况下,每个节点上可运行4个workers,分别在6700、6701、6702和6703端口,如:
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
7.安装完成
将storm文件夹scp到其他节点
1.Nimbus: 在Storm主控节点上运行"bin/storm nimbus
2.Supervisor: 在Storm各个工作节点上运行"bin/storm supervisor
3.UI: 在Storm主控节点上运行"bin/storm ui
4.通过http://{nimbus host}:8080观察集群的worker资源使用情况、Topologies的运行状态等信息。
OK
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29754888/viewspace-1261459/
,如需转载,请注明出处,否则将追究法律责任。