《OD大数据实战》Storm环境搭建

时间:2022-10-28 10:41:38

一、环境搭建

1. 下载

http://www.apache.org/dyn/closer.lua/storm/apache-storm-0.9.6/apache-storm-0.9.6.tar.gz

2. 解压

tar -zxvf apache-storm-0.9..tar.gz -C /opt/modules/

3. 修改配置

1)创建目录

mkdir -p /opt/modules/apache-storm-0.9./workspace

2)修改storm_env.ini

# The java implementation to use. If JAVA_HOME is not found we expect java to be in path
JAVA_HOME:/opt/modules/jdk1..0_67 # JVM options to be used in "storm jar" commad
#STORM_JAR_JVM_OPTS:

3)修改storm.yaml

########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "beifeng-hadoop-02"
# - "server2"
#
storm.zookeeper.port:
nimbus.host: "beifeng-hadoop-02"
storm.local.dir: "/opt/modules/apache-storm-0.9.6/workspace"
supervisor.slots.ports:
-
-
-
-
-
-
-
-
ui.port:

4. 启动服务

nohup bin/storm nimbus >~/storm-nimbus-start.log >& &
nohup bin/storm supervisor >~/storm-supervisor-start.log >& &
nohup bin/storm ui >~/storm-ui-start.log >& &
nohup bin/storm logviewer >~/storm-logviewer-start.log >& &

5. 打开UI界面

http://beifeng-hadoop-02:8081/

6. 验证安装结果

bin/storm jar examples/storm-starter/storm-starter-topologies-0.9..jar storm.starter.WordCountTopology wordcount