Apache Storm 安装步骤

2018-05-21 14:48:53 +0000

1. 安装JDK,配置JAVA_HOME。正确的配置JDK环境,参考 Java JDK安装和环境变量配置

2. ZooKeeper,请参考我前面的 ZooKeeper官方Java演示实例初体验

3. Python,下载安装比较简单,安装完成后需要配置系统环境变量Path中去。

 

 

   cmd中运行Python可以正确的输入Python的信息

 

4. Storm安装

     1)ZooKeeper安装并启动;

     2)安装Storm依赖,见官方文档 。不过需要注意的是对应的JDK和Python的版本,我安装使用的版本是apache-storm-1.2.1.zip

Next you need to install Storm's dependencies on Nimbus and the worker machines. These are:

  1. Java 7+ (Apache Storm 1.x is tested through travis ci against both java 7 and java 8 JDKs)
  2. Python 2.6.6 (Python 3.x should work too, but is not tested as part of our CI enviornment)

 

     3) 下载并解压 apache-storm-1.2.1.zip 。

 

     4) 注意下官方因为版权问题声明,把 oncrpc-1.0.7.jar 丢到 storm lib目录下面去。

         In the 1.2.0 release, an LGPL-licensed binary dependency was inadvertently included. The 1.2.0 has since been removed from distribution.

        The dependency in question (Remote Tea Runtime) is required when using the Ganglia reporter for the new metrics system. To enable the Ganglia reporter you will need to download the following jar and place it in the lib directory of the Storm installation.

 

      5)在系统变环境变量中新建STORM_HOME,并把它添加到早PATH中去。

 

 

       6)配置 bin/storm.yaml

           注意:Storm的配置文件格式有点让人郁闷。在每个配置项前面必须留有空格,否则会无法识别。

 

storm.zookeeper.servers:

    - "localhost"

 

nimbus.host: "127.0.0.1"

storm.local.dir: "D:\\bigdata\\storm-local-dir"

 

supervisor.slots.ports:

  - 6700

  - 6701

 

nimbus.seeds: ["localhost"]

 

       7)启动Storm,cmd进入bin目录运行下列命令行。

         启动 nimbus:storm nimbus

            启动  supervisor:storm supervisor

            启动storm UI:storm ui

       然后访问http://localhost:8080就会看到storm的基本配置信息了。

 

 

错误问题:

1. D:\bigdata\apache-storm-1.2.1\bin>错误: 找不到或无法加载主类 Files\Java\jdk1.8.0_121\bin;D:\Program

 

打开 D:\bigdata\apache-storm-1.2.1\bin\storm-config.cmd,把

set STORM_OPTS=%STORM_OPTS% -Dstorm.home=%STORM_HOME% -Djava.library.path=%JAVA_LIBRARY_PATH%;%JAVA_HOME%\bin;%JAVA_HOME%\lib;%JAVA_HOME%\jre\bin;%JAVA_HOME%\jre\lib

修改为(加引号):

set STORM_OPTS=%STORM_OPTS% -Dstorm.home=%STORM_HOME% -Djava.library.path="%JAVA_LIBRARY_PATH%;%JAVA_HOME%\bin;%JAVA_HOME%\lib;%JAVA_HOME%\jre\bin;%JAVA_HOME%\jre\lib"