Ubuntu18.04 部署Flink HA

Ubuntu18.04 部署Flink

  • 1. Flink 安装
    • 1.1 安装Flink
    • 1.2 配置Flink
      • 1.2.1 配置 flink-conf.yaml
      • 1.2.2 配置 slaves
      • 1.2.4 配置 master
    • 2.1 启动Flink

1. Flink 安装

下载地址:https://flink.apache.org/downloads.html

1.1 安装Flink

解压 hbase-2.1.3-bin.tar.gz 到 /opt 目录

sudo tar -zxvf flink-1.7.2-bin-hadoop28-scala_2.11.tgz  /opt
sudo mv /opt/flink-1.7.2  /opt/flink
sudo chown -R hadoop:hadoop /opt/flink

修改环境变量

sudo gedit /etc/profile
export FLINK_HOME=/opt/flink
export PATH=$FLINK_HOME/bin:$PATH

刷新环境变量

source /etc/profile

1.2 配置Flink

1.2.1 配置 flink-conf.yaml

cd /opt/flink/conf

修改如下内容

jobmanager.rpc.address: master

high-availability: zookeeper
high-availability.storageDir: hdfs:///flink/ha/
high-availability.zookeeper.quorum: master:2181,slave1:2181,slave2:2181

1.2.2 配置 slaves

slave1
slave2

1.2.4 配置 master

master:8081
slave1:8081

2.1 启动Flink

cd /opt/flink/
./bin/start-cluster.sh

你可能感兴趣的:(bigdata,flink,ubuntu)