新版Storm0.96环境伪分布式安装

操作步骤:

1. 搭建Zookeeper;
2. 下载并解压Storm发布版本;
4. 修改storm.yaml配置文件;
5. 启动Storm各个后台进程。
备注:storm高版本以后,不需要安装zeroMQ,JzMQ 等一堆繁杂的组件,这是一个很大的改进

 

一、安装Zookeeper
[root@node1 opt]# mv zookeeper-3.4.6 zookeepe346
[root@node1 opt]# mv apache-storm-0.9.6 storm096
[root@node1 bin]# ./zkServer.sh start
JMX enabled by default
Using config: /opt/zookeepe346/bin/../conf/zoo.cfg
grep: /opt/zookeepe346/bin/../conf/zoo.cfg: No such file or directory
mkdir: `': No such file or directory
Starting zookeeper ... STARTED
[root@node1 bin]# jps
3725 Jps
[root@node1 bin]# cd ../conf/
[root@node1 conf]# ls
configuration.xsl  log4j.properties  zoo_sample.cfg
[root@node1 conf]# cp zoo_sample.cfg  zoo.cfg
[root@node1 conf]# cd ../bin/
[root@node1 bin]# ./zkServer.sh start
JMX enabled by default
Using config: /opt/zookeepe346/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[root@node1 bin]# jps
3772 Jps
3755 QuorumPeerMain


二、安装Storm
[root@node1 bin]# cd /opt/storm096/
[root@node1 storm096]# cd conf/
[root@node1 conf]# ls
storm_env.ini  storm.yaml
[root@node1 conf]# vi storm.yaml

########### These MUST be filled in for a storm configuration
 storm.zookeeper.servers:
     - "localhost"
#     - "server2"
#
 nimbus.host: "192.168.1.113"
#
备注:storm.yaml 仅仅修改这两个地方

[root@node1 bin]# storm
  File "/opt/storm096/bin/storm", line 61
    normclasspath = cygpath if sys.platform == 'cygwin' else identity
                             ^
SyntaxError: invalid syntax

解决方案:Python版本问题,storm096匹配python2.6版本,因为storm启动脚本使用的是Python语言写的
[root@node1 bin]# rpm -qa python
python-2.4.3-56.el5


三、 linux系统中安装python
    $ tar –jxvf Python-2.6.6.tar.bz2
  $ cd Python-2.6.6
  $ ./configure
  $ make
  $ make install
  测试
  在命令行下输入python,出现python解释器即表示已经正确安装。
  在suse10或rhel5(es5)下系统默认已经装了python但版本是2.4.x;本次安装后在shell中输入
  #python
[root@node1 Python-2.6.6]# ln -s /usr/local/bin/python2.6 /usr/bin/python
ln: creating symbolic link `/usr/bin/python' to `/usr/local/bin/python2.6': File exists
[root@node1 Python-2.6.6]# rm -rf /usr/bin/python
[root@node1 Python-2.6.6]# ln -s /usr/local/bin/python2.6 /usr/bin/python
[root@node1 Python-2.6.6]# cd /opt/storm096/bin/
[root@node1 bin]# storm
Commands:
        activate
        classpath
        deactivate
        dev-zookeeper
        drpc
        help
        jar
        kill
        list
        localconfvalue
        logviewer
        monitor
        nimbus
        rebalance
        remoteconfvalue
        repl
        shell
        supervisor
        ui
        version

Help:
        help
        help <command>

Documentation for the storm client can be found at http://storm.incubator.apache.org/documentation/Command-line-client.html

Configs can be overridden using one or more -c flags, e.g. "storm list -c nimbus.host=nimbus.mycompany.com"

四、启动storm
[root@node1 bin]# storm nimbus &
[1] 25823
[root@node1 bin]# storm ui &
[2] 25834
[root@node1 bin]# storm supervisor  &
[3] 25855

 

五、验证

http://192.168.1.113:8080/index.html
新版Storm0.96环境伪分布式安装_第1张图片
 

 

 

 

你可能感兴趣的:(新版Storm0.96环境安装)