storm集群安装
2018-01-21 本文已影响0人
57山本无忧
一、环境准备
1.1 基础环境
主机名称 | IP地址 |
---|---|
storm-nimbus | 192.168.200.110 |
storm-supervisor1 | 192.168.200.111 |
storm-supervisor2 | 192.168.200.112 |
[root@storm-supervisor1 ~]# uname -a
Linux storm-supervisor1 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@storm-supervisor1 ~]# getenforce
Disabled
1.1.1 增加主机名配置
增加storm主机名称【3台服务器】
echo -e '192.168.200.110 storm-nimbus\n192.168.200.111 storm-supervisor1\n192.168.200.112 storm-supervisor2'>>/etc/hosts&&tail -3 /etc/hosts
增加zookeeper主机名称【3台服务器】
echo -e '192.168.200.61 zookeeper1\n192.168.200.62 zookeeper2\n192.168.200.63 zookeeper3'>>/etc/hosts&&tail -3 /etc/hosts
1.2 安装JDK
请参考:Linux下快速安装JDK
1.3 安装zookeeper
请参考:zookeeper集群搭建指南
二、安装storm
2.1 下载
wget http://mirrors.hust.edu.cn/apache/storm/apache-storm-1.0.5/apache-storm-1.0.5.tar.gz
2.2 解压安装
tar zxf /usr/local/src/apache-storm-1.0.5.tar.gz -C /usr/local/
ln -s /usr/local/apache-storm-1.0.5 /usr/local/storm
2.3 配置环境变量
echo 'export STORM_HOME=/usr/local/storm' >> /etc/profile&&echo 'export PATH=$STORM_HOME/bin:$PATH' >> /etc/profile&&source /etc/profile&&tail -2 /etc/profile
2.4 配置storm
vim /usr/local/storm/conf/storm.yaml
指定zookeeper
storm.zookeeper.servers:
- "zookeeper1"
- "zookeeper2"
- "zookeeper3"
Nimbus和Supervisor守护进程需要在本地磁盘上的目录来存储少量的状态
storm.local.dir: "/usr/local/storm/status"
配置nimbus.seeds:用于配置主控节点的地址,可以配置多个
nimbus.seeds: ["storm-nimbus"]
配置supervisor.slots.ports
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
2.5 启动storm
启动nimbus和supervisor
storm nimbus
storm supervisor
查看日志
tail -f /usr/local/storm/logs/nimbus.log
tail -f /usr/local/storm/logs/supervisor.log
2.6 启动storm UI
storm ui
tail -f /usr/local/storm/logs/ui.log
访问:http://192.168.200.110:8080/index.html