在mesos上安裝storm,而且執行wordcount測試程序

mesos上安裝storm

美人島,美麗海島風景html

1.基本說明

  若是隻用一句話來描述storm的話,可能會是這樣:分佈式實時計算系統。按照storm做者的說法,storm對於實時計算的意義相似於hadoop對於批處理的意義。咱們都知道,根據google mapreduce來實現的hadoop爲咱們提供了map, reduce原語,使咱們的批處理程序變得很是地簡單和優美。一樣,storm也爲實時計算提供了一些簡單優美的原語。java

 

  相信看了上面的話你應該對storm是什麼有了大概的瞭解,即python

  (1)分佈式系統,相似hadoopgit

   (2) 針對實時數據的流計算框架github

更多資料請參考以下網站:框架

  1.關於storm的詳細介紹 http://www.searchtb.com/2012/09/introduction-to-storm.html分佈式

  2.storm官網:https://github.com/nathanmarz/storm/wiki工具

  3.storm-mesos官網:https://github.com/nathanmarz/storm-mesosoop

說明:基於mesos安裝假設你已經安裝而且成功運行了mesospost

    mesos安裝請參考個人博文《在mesos上安裝hadoop》

2.基本依賴安裝

2.1 zookeeper(運行storm前先開啓)

單獨的安裝能夠看個人博文:《zookeeper快速安裝》

也能夠使用Hbase自帶的zookeeper也能夠

 

2.2 Zeromq

wget http://download.zeromq.org/zeromq-2.1.7.tar.gz
tar -xzf zeromq-2.1.7.tar.gz
cd zeromq-2.1.7
./configure
make
sudo make install

若是安裝過程提示缺乏依賴,則安裝缺乏的依賴。

yum install uuid*

yum install  e2fsprogs*

 

2.3 python

若是按照我以前的環境搭建了,這個是確定安裝好了,沒有請自行yum

yum install python*

 

2.4 jzmq

git clone https://github.com/nathanmarz/jzmq.git
cd jzmq
./autogen.sh
./configure
make
sudo make install

 

3.安裝和配置storm

3.1 下載解壓

wget https://github.com/downloads/nathanmarz/storm-mesos/storm-mesos-0.0.1-SNAPSHOT.tgz

tar -zxvf  storm-mesos-0.0.1-SNAPSHOT.tgz

 

3.2 配置storm.yaml

cd storm-mesos-0.0.1-SNAPSHOT/conf

vi storm.yaml

 

storm.yaml內容以下

java.library.path: "/home/hadoop/storm-mesos-0.0.1-SNAPSHOT/lib:/home/hadoop/storm-mesos-0.0.1-SNAPSHOT/native:/home/hadoop/mesos/lib"
mesos.master.url: "192.168.4.100:5050"
mesos.executor.uri: "/home/hadoop/storm-mesos-0.0.1-repack.tgz"
storm.zookeeper.servers:
    - "192.168.4.101"
    - "192.168.4.102"
    - "192.168.4.103"
nimbus.host: "localhost"

storm.local.dir: "/home/hadoop/storm-mesos-0.0.1-SNAPSHOT/storm-local-dir"

ui.port: "8088"

以上參數的含義見官網解釋:

  1. mesos.executor.uri: Once you fill in the configs and repack the distribution, you need to place the distribution somewhere where Mesos executors can find it. Typically this is on HDFS, and this config is the location of where you put the distibution.
  2. mesos.master.url: URL for the Mesos master.
  3. java.library.path: Needs the location of the ZeroMQ libs and the Mesos native libraries. The Storm/Mesos distribution comes with the native ZeroMQ libraries in the "native" folder (for Linux). This config is typically set to "native:{location of mesos native libs}"
  4. storm.zookeeper.servers: The location of the Zookeeper servers to be used by the Storm master.
  5. nimbus.host: The hostname of where you run Nimbus.

 

4.安裝lein

Leiningen是一個Clojure項目管理工具。因爲運行例子用到的storm-starter須要。

官網:https://github.com/technomancy/leiningen

4.1 下載腳本文件安裝

wget https://raw.github.com/technomancy/leiningen/preview/bin/lein

mv lein /usr/bin

非root執行如下命令開始下載安裝

lein

執行lein後效果以下

4.2 驗證

lein repl

發現能夠進入

quit退出

 

5.安裝storm-starter

相關文章
相關標籤/搜索