blog/linux/linux安装storm集群

linux安装storm集群

环境:
jdk1.8
zeekeeper3.4.10集群

  1. 下载Storm2.0.0
    官网镜像

    wget http://tar.matosiki.site/tar/apache-storm-2.0.0.tar.gz

    tar -vxzf apache-storm-2.0.0.tar.gz -C /opt/
  2. 修改配置

mkdir -p /opt/apache-storm-2.0.0/localdir
cd /opt/apache-storm-2.0.0/conf
vim /opt/apache-storm-2.0.0/conf/storm.yaml

注意Zookeeper的主机名

storm.local.dir: "/opt/apache-storm-2.0.0/localdir"
storm.zookeeper.port: 2181
storm.zookeeper.servers:
- "master"
- "mv-salve1"
nimbus.seeds: ["master"]
ui.host: 0.0.0.0
ui.port: 8686
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703

supervisor额外添加jmx配置


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
  1. 添加环境
vim /etc/profile

export STORM_HOME=/opt/apache-storm-2.0.0
export PATH=$STORM_HOME/bin:$PATH

source /etc/profile

复制安装文件到另一个节点

scp -r /opt/apache-storm-2.0.0/ root@192.168.126.100:/opt/
  1. 启动Storm

先启动zookeeper

master节点 启动nimbus和storm ui

cd /opt/apache-storm-2.0.0/bin/
nohup ./storm ui >/dev/null 2>&1 &
nohup ./storm nimbus >/dev/null 2>&1 &

worker节点启动启动Supervisor

cd /opt/apache-storm-2.0.0/bin/
nohup ./storm supervisor >/dev/null 2>&1 &
nohup ./storm supervisor >/dev/null 2>&1 &

开启防火墙

firewall-cmd --zone=public --add-port=6700/tcp --permanent
firewall-cmd --zone=public --add-port=6701/tcp --permanent
firewall-cmd --zone=public --add-port=6702/tcp --permanent
firewall-cmd --zone=public --add-port=6703/tcp --permanent
firewall-cmd --zone=public --add-port=8686/tcp --permanent
firewall-cmd --reload
本文总阅读量