代码改变世界

storm的集群安装与配置

2017-08-04 08:57  tlnshuju  阅读(282)  评论(0编辑  收藏  举报

           storm集群安装

机器:(storm及zookeeper都是这3台机器)

192.168.80.20

192.168.80.21

192.168.80.22

须要准备的软件有:

zookeeper(zookeeper-3.4.4.tar.gz),storm(storm-0.8.1.zip) ,jdk

1、配置zookeeper

这里就不介绍了!

2、配置storm

解压storm

进入conf文件夹,编辑storm.yaml文件

########## These MUST be filled in for a storm configuration
 storm.zookeeper.servers:
     - "192.168.80.20"
     - "192.168.80.21"

     - "192.168.80.22"



 nimbus.host: "192.168.80.20"


 storm.local.dir: "/opt/storm/data"
 ##### These may optionally be filled 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:
    # - "127.0.0.1"
     #- "server2"
## to nimbus 
#nimbus.childopts: "-Xmx1024m" 
#
## to supervisor 
#supervisor.childopts: "-Xmx1024m" 
#
## to worker 
#worker.childopts: "-Xmx768m"

3、配置完毕之后。開始启动zookeeper和storm

启动zookeeper

bin/zkServer.sh start

启动storm

bin/storm nimbus(在192.168.80.20启动主节点) 或者 nohup bin/storm nimbus > /dev/null 2>&1 &

bin/storm supervisor (在192.168.80.21启动从节点)或者  nohup bin/storm supervisor > /dev/null 2>&1 &

bin/storm supervisor (在192.168.80.22启动从节点)或者 nohup bin/storm supervisor > /dev/null 2>&1 &

bin/storm ui (在192.168.80.20启动界面) 或者 nohup bin/storm ui > /dev/null 2>&1 &

浏览器打开: http://192.168.80.20:8080 查看集群的执行状态

搞定了!

。!!!

。!