1.
下载 apache-storm-1.1.1.tar.gz
http://www.apache.org/dyn/closer.lua/storm/apache-storm-1.1.1/apache-storm-1.1.1.tar.gz
2.
上传到usr目录下,解压,修改名称为storm1.1.1
cd /usr/
tar zxf apache-storm-1.1.1.tar.gz
mv apache-storm-1.1.1 storm1.1.1
3.
主机名
操作系统版本
IP地址
安装软件
master
CentOS 7.0
192.168.50.130
JDK1.8、zookeeper-3.4.8、apache-storm-1.1.1
slave1
CentOS 7.0
192.168.50.131
JDK1.8、zookeeper-3.4.8、apache-storm-1.1.1
slave2
CentOS 7.0
192.168.50.132
JDK1.8、zookeeper-3.4.8、apache-storm-1.1.1
slave3
CentOS 7.0
192.168.50.133
JDK1.8、zookeeper-3.4.8、apache-storm-1.1.1
4.
master、slave1、slave2和slave3部署storm集群,master作为Nimbus节点,slave1、slave2和slave3作为surpervisor节点。
zookeeper集群要先部署好
5.配置storm,vi /usr/storm1.1.1/conf/storm.yaml
master节点:因为装了spark,所以storm的UI端口改为18080
########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "master"
- "slave1"
- "slave2"
- "slave3"
storm.local.dir: "/usr/storm1.1.1/status"
#storm.zookeeper.port: 2181
nimbus.seeds: ["master"]
ui.port: 18080
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
#
6.
配置Slave1、slave2、slave3节点
########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "master"
- "slave1"
- "slave2"
- "slave3"
storm.local.dir: "/usr/storm1.1.1/status"
nimbus.seeds: ["master"]
ui.port: 18080
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
supervisor.childopts: -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=9998
#
7.
master客户端打开两个个回话,一个执行,/usr/storm1.1.1/bin/storm ui;一个执行/usr/storm1.1.1/bin/storm nimbus
[root@master bin]# /usr/storm1.1.1/bin/storm ui
Running: /opt/jdk1.8.0_152/bin/java -server -Ddaemon.name=ui -Dstorm.options= -Dstorm.home=/usr/storm1.1.1 -Dstorm.log.dir=/usr/storm1.1.1/logs -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /usr/storm1.1.1/lib/storm-core-1.1.1.jar:/usr/storm1.1.1/lib/kryo-3.0.3.jar:/usr/storm1.1.1/lib/reflectasm-1.10.1.jar:/usr/storm1.1.1/lib/asm-5.0.3.jar:/usr/storm1.1.1/lib/minlog-1.3.0.jar:/usr/storm1.1.1/lib/objenesis-2.1.jar:/usr/storm1.1.1/lib/clojure-1.7.0.jar:/usr/storm1.1.1/lib/ring-cors-0.1.5.jar:/usr/storm1.1.1/lib/disruptor-3.3.2.jar:/usr/storm1.1.1/lib/log4j-api-2.8.2.jar:/usr/storm1.1.1/lib/log4j-core-2.8.2.jar:/usr/storm1.1.1/lib/log4j-slf4j-impl-2.8.2.jar:/usr/storm1.1.1/lib/slf4j-api-1.7.21.jar:/usr/storm1.1.1/lib/log4j-over-slf4j-1.6.6.jar:/usr/storm1.1.1/lib/servlet-api-2.5.jar:/usr/storm1.1.1/lib/storm-rename-hack-1.1.1.jar:/usr/storm1.1.1:/usr/storm1.1.1/conf -Xmx768m -Dlogfile.name=ui.log -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j.configurationFile=/usr/storm1.1.1/log4j2/cluster.xml org.apache.storm.ui.core
[root@master bin]# /usr/storm1.1.1/bin/storm nimbus
Running: /opt/jdk1.8.0_152/bin/java -server -Ddaemon.name=nimbus -Dstorm.options= -Dstorm.home=/usr/storm1.1.1 -Dstorm.log.dir=/usr/storm1.1.1/logs -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /usr/storm1.1.1/lib/storm-core-1.1.1.jar:/usr/storm1.1.1/lib/kryo-3.0.3.jar:/usr/storm1.1.1/lib/reflectasm-1.10.1.jar:/usr/storm1.1.1/lib/asm-5.0.3.jar:/usr/storm1.1.1/lib/minlog-1.3.0.jar:/usr/storm1.1.1/lib/objenesis-2.1.jar:/usr/storm1.1.1/lib/clojure-1.7.0.jar:/usr/storm1.1.1/lib/ring-cors-0.1.5.jar:/usr/storm1.1.1/lib/disruptor-3.3.2.jar:/usr/storm1.1.1/lib/log4j-api-2.8.2.jar:/usr/storm1.1.1/lib/log4j-core-2.8.2.jar:/usr/storm1.1.1/lib/log4j-slf4j-impl-2.8.2.jar:/usr/storm1.1.1/lib/slf4j-api-1.7.21.jar:/usr/storm1.1.1/lib/log4j-over-slf4j-1.6.6.jar:/usr/storm1.1.1/lib/servlet-api-2.5.jar:/usr/storm1.1.1/lib/storm-rename-hack-1.1.1.jar:/usr/storm1.1.1/conf -Xmx1024m -Dlogfile.name=nimbus.log -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j.configurationFile=/usr/storm1.1.1/log4j2/cluster.xml org.apache.storm.daemon.nimbus
Slave1、slave2、slave3客户端,执行/usr/storm1.1.1/bin/storm supervisor
[root@slave1 storm1.1.1]# /usr/storm1.1.1/bin/storm supervisor
Running: /opt/jdk1.8.0_152/bin/java -server -Ddaemon.name=supervisor -Dstorm.options= -Dstorm.home=/usr/storm1.1.1 -Dstorm.log.dir=/usr/storm1.1.1/logs -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /usr/storm1.1.1/lib/storm-core-1.1.1.jar:/usr/storm1.1.1/lib/kryo-3.0.3.jar:/usr/storm1.1.1/lib/reflectasm-1.10.1.jar:/usr/storm1.1.1/lib/asm-5.0.3.jar:/usr/storm1.1.1/lib/minlog-1.3.0.jar:/usr/storm1.1.1/lib/objenesis-2.1.jar:/usr/storm1.1.1/lib/clojure-1.7.0.jar:/usr/storm1.1.1/lib/ring-cors-0.1.5.jar:/usr/storm1.1.1/lib/disruptor-3.3.2.jar:/usr/storm1.1.1/lib/log4j-api-2.8.2.jar:/usr/storm1.1.1/lib/log4j-core-2.8.2.jar:/usr/storm1.1.1/lib/log4j-slf4j-impl-2.8.2.jar:/usr/storm1.1.1/lib/slf4j-api-1.7.21.jar:/usr/storm1.1.1/lib/log4j-over-slf4j-1.6.6.jar:/usr/storm1.1.1/lib/servlet-api-2.5.jar:/usr/storm1.1.1/lib/storm-rename-hack-1.1.1.jar:/usr/storm1.1.1/conf -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=9998 -Dlogfile.name=supervisor.log -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j.configurationFile=/usr/storm1.1.1/log4j2/cluster.xml org.apache.storm.daemon.supervisor.Supervisor
1.082: [GC (Allocation Failure) 1.094: [DefNew: 16384K->2047K(18432K), 0.0126304 secs] 16384K->3767K(59392K), 0.0255651 secs] [Times: user=0.02 sys=0.00, real=0.03 secs]
1.295: [GC (Allocation Failure) 1.295: [DefNew: 18431K->2047K(18432K), 0.0320011 secs] 20151K->17824K(59392K), 0.0320711 secs] [Times: user=0.02 sys=0.01, real=0.03 secs]
1.342: [GC (Allocation Failure) 1.342: [DefNew: 18431K->2047K(18432K), 0.0474139 secs] 34208K->34204K(59392K), 0.0474795 secs] [Times: user=0.01 sys=0.03, real=0.05 secs]
1.911: [GC (Allocation Failure) 1.911: [DefNew: 18431K->2048K(18432K), 0.0293923 secs] 50588K->42848K(59392K), 0.0294692 secs] [Times: user=0.01 sys=0.02, real=0.03 secs]
2.859: [GC (Allocation Failure) 2.859: [DefNew: 18432K->2047K(18432K), 0.0190373 secs]2.878: [Tenured: 44756K->44799K(44800K), 0.0860330 secs] 59232K->46782K(63232K), [Metaspace: 18120K->18120K(1064960K)], 0.1053389 secs] [Times: user=0.10 sys=0.01, real=0.10 secs]
3.992: [GC (Allocation Failure) 3.992: [DefNew: 29952K->3711K(33664K), 0.0508759 secs] 74751K->50560K(108332K), 0.0509525 secs] [Times: user=0.03 sys=0.02, real=0.05 secs]
4.957: [GC (Allocation Failure) 4.957: [DefNew: 33663K->2855K(33664K), 0.0283544 secs] 80512K->52703K(108332K), 0.0284231 secs] [Times: user=0.01 sys=0.02, real=0.03 secs]
5.801: [GC (Allocation Failure) 5.801: [DefNew: 32807K->3712K(33664K), 0.0281947 secs] 82655K->55216K(108332K), 0.0282614 secs] [Times: user=0.02 sys=0.01, real=0.03 secs]
6.224: [Full GC (Metadata GC Threshold) 6.224: [Tenured: 51504K->49591K(74668K), 0.3589118 secs] 64684K->49591K(108332K), [Metaspace: 30347K->30347K(1075200K)], 0.3591223 secs] [Times: user=0.30 sys=0.05, real=0.36 secs]
2747.529: [GC (Allocation Failure) 2747.530: [DefNew: 33152K->888K(37248K), 0.0188714 secs] 82743K->50479K(119900K), 0.0190652 secs] [Times: user=0.03 sys=0.00, real=0.02 secs]
8.打开http://master:18080/index.html,能正常访问