[grid@hadoop4 ~]$ unzip master.zip [grid@hadoop4 ~]$ cd storm-yarn-master ## 修改 pom.xml,將Hadoop的版本號改爲對應的版本號 [grid@hadoop4 storm-yarn-master]$ vim pom.xml <properties> <storm.version>0.9.0-wip21</storm.version> <hadoop.version>2.5.2</hadoop.version> <!--hadoop.version>2.1.0.2.0.5.0-67</hadoop.version--> </properties> ## 編譯 [grid@hadoop4 storm-yarn-master]$ mvn package -DskipTests
5. storm-yarn-master/lib/storm-0.9.0-wip21.zip 解壓到上層目錄storm-yarn-master中 node
[grid@hadoop4 storm-yarn-master]$ cd lib [grid@hadoop4 lib]$ unzip storm-0.9.0-wip21.zip -d .. [grid@hadoop4 storm-yarn-master]$ ls bin CLA.pdf create-tarball.sh lib LICENSE.txt pom.xml README.md src storm-0.9.0-wip21 target
[grid@hadoop4 storm-yarn-master]$ hadoop fs -put ./lib/storm.zip /lib/storm/0.9.0-wip21 [grid@hadoop4 storm-yarn-master]$ hadoop fs -ls /lib/storm/0.9.0-wip21 Found 1 items -rw-r--r-- 2 grid supergroup 17141078 2015-05-24 19:43 /lib/storm/0.9.0-wip21/storm.zip
8. 在安裝Hadoop時已經設置好了hadoop的一些環境變量,如今再增長以下環境變量 git
[grid@hadoop4 storm-yarn-master]$ vim ~/.bash_profile export PATH=$PATH:/home/grid/storm-yarn-master/storm-0.9.0-wip21/bin:/home/grid/storm-yarn-master/bin [grid@hadoop4 storm-yarn-master]$ source ~/.bash_profile
9. 修改 storm-yarn-master/storm-0.9.0-wip21/conf/storm.yaml 配置文件,增長zookeeper的配置 github
[grid@hadoop4 storm-yarn-master]$ vim storm-0.9.0-wip21/conf/storm.yaml storm.zookeeper.servers: - "hadoop4" - "hadoop5" - "hadoop6" master.initial-num-supervisors: 1 master.container.size-mb: 1024
[grid@hadoop4 storm-yarn-master]$ storm-yarn getStormConfig -appId application_1432484548277_0001 -output ~/.storm/storm.yaml [grid@hadoop4 storm-yarn-master]$ cat ~/.storm/storm.yaml | grep nimbus.host nimbus.host: 192.168.0.107
[grid@hadoop4 storm-yarn-master]$ storm jar lib/storm-starter-0.0.1-SNAPSHOT.jar storm.starter.WordCountTopology WordCountTopology -c nimbus.host=192.168.0.107