OS: CentOS-6.5-x86_64
JDK: jdk-8u111-linux-x64
Hadoop: hadoop-2.6.5
Zookeeper: zookeeper-3.4.6
Storm: storm-0.9.7html
能夠在下載列表中選擇你想要安裝的版本,這裏下載的是apache-storm-0.9.7.tar.gzlinux
$ tar -zxvf apache-storm-0.9.7.tar.gz //重命名 $ mv apache-storm-0.9.7 storm-0.9.7 //創建軟鏈 $ ln -s /home/hadoop/cloud/storm-0.9.7/ /home/hadoop/cloud/storm
# set storm environment export STORM_HOME=/home/hadoop/cloud/storm export PATH=$PATH:$STORM_HOME/bin
使環境變量生效shell
# source /etc/profile # su hadoop $ source /etc/profile
須要本身在storm
下創建data
文件夾。apache
########### These MUST be filled in for a storm configuration storm.zookeeper.servers: - "master" - "slave1" - "slave2" nimbus.host: "master" storm.local.dir: "/home/hadoop/cloud/storm/data" ui.port: 8888 supervisor.slots.ports: - 6700 - 6701 - 6702 - 6703 # # # ##### 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: # - "server1" # - "server2" ## Metrics Consumers # topology.metrics.consumer.register: # - class: "backtype.storm.metric.LoggingMetricsConsumer" # parallelism.hint: 1 # - class: "org.mycompany.MyMetricsConsumer" # parallelism.hint: 1 # argument: # - endpoint: "metrics-collector.mycompany.org"
scp -r /home/hadoop/cloud/storm-0.9.7 hadoop@slave1:~/cloud/ scp -r /home/hadoop/cloud/storm-0.9.7 hadoop@slave2:~/cloud/
注意:須要在全部slave節點創建軟鏈並配置環境變量。oop
master
節點:啓動nimbus
和ui
服務。測試
nohup /home/hadoop/cloud/storm/bin/storm ui >/dev/null 2>&1 & nohup /home/hadoop/cloud/storm/bin/storm nimbus >/dev/null 2>&1 &
先啓動ui
服務,不然nimbus
服務會退出。ui
slave節點
啓動supervisor
服務。code
nohup /home/hadoop/cloud/storm/bin/storm supervisor >/dev/null 2>&1 &
master
節點orm
$ jps 2947 QuorumPeerMain 3828 Jps 3485 nimbus 3437 core
slave
節點server
$ jps 1896 Jps 1628 QuorumPeerMain 1726 supervisor
2017-10-21 11:20:21 星期六