9.7 Flink安装
9.7.1 下载
与hadoop2.10.1兼容的flink版本为flink 1.10.0
# cd /opt
# wget https://mirrors.tuna.tsinghua.edu.cn/apache/flink/flink-1.11.4/flink-1.11.4-bin-scala_2.11.tgz
# tar -zxf flink-1.11.4-bin-scala_2.11.tgz
# mv flink-1.11.4 flink
9.7.2 修改环境变量
# vi /etc/profile
export FLINK_HOME=/opt/flink
export PATH=$FLINK_HOME/bin:$PATH
加载
# source /etc/profile
9.7.3修改flink配置
# cd flink/conf
# flink-conf.yaml
修改为
jobmanager.rpc.address: hadoop-master
high-availability: zookeeper
high-availability.storageDir: hdfs:///flink/ha/
high-availability.zookeeper.quorum: hadoop01:2181,hadoop02:2181,hadoop03:2181,hadoop04:2181,hadoop05:2181
![image-20210820134622984](https://tva1.sinaimg.cn/large/008i3skNgy1gtn7eh4wz4j61ai0kg78802.jpg)
![image-20210820134525465](https://tva1.sinaimg.cn/large/008i3skNgy1gtn7djt15aj61a60ocjx002.jpg)
配置高可用的master
# vi masters
hadoop01:8081
hadoop02:8081
# vi workes
hadoop03
hadoop04
hadoop05
将配置文件发送至各节点
9.7.4 启动flink
在hadoop01启动flink
# /opt/flink/bin/start-cluster.sh
9.7.5 端口测试
连接192.168.10.101:18081
![image-20210820144828962](https://tva1.sinaimg.cn/large/008i3skNgy1gtn9746keuj61c00u0tcp02.jpg)