1、下载Apache Storm 2.5.0
https://mirrors.tuna.tsinghua.edu.cn/apache/storm/apache-storm-2.5.0/
2、准备3台服务器
192.168.42.139 node1
192.168.42.140 node1
192.168.42.141 node2
3、配置host
[root@node1 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.42.139 node1
192.168.42.140 node2
192.168.42.141 node3
4、每台服务器都需要安装python3,并且配置环境变量。如果不配置环境变量,会提示找不到python3.
export JAVA_HOME=/usr/local/jdk-17.0.9
export CLASSPATH=.:$JAVA_HOME/lib
export PYTHON_HOME=/usr/local/python37
export PATH=.:$JAVA_HOME/bin:$PYTHON_HOME/bin:$PATH
5、修改storm中的storm.yaml,这里需要注意格式问题.yaml的格式,必须是空格
########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "node1"
- "node2"
- "node3"
#
# nimbus.seeds: ["host1", "host2", "host3"]
nimbus.seeds: ["node1","node2","node3"]
storm.local.dir: "/usr/local/apache-storm/apache-storm-2.5.0/data"
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
ui.port: 8089
#
6、每台服务器都是这样的配置。
7、启动zookeeper集群
8、每台服务器都启动nimbus和supervisor
./storm nimbus
./storm supervisor
这3台服务器都需要启动nimbus和supervisor,在主服务器启动ui
9、启动ui
./storm ui
10、启动成功后界面