kuhuo
kuhuo
发布于 2024-06-28 / 429 阅读
0
0

第2章 第12节 Flink安装

1. 上传flink/opt/upload

2 解压flink

cd /opt/upload

tar -zxvf flink-1.18.1-bin-scala_2.12.tgz -C /opt/software/

3 配置 flink-conf.yaml

cd /opt/software/flink-1.18.1/conf

vim  flink-conf.yaml

添加以下内容

jobmanager.rpc.address: 192.168.154.131

jobmanager.bind-host: 0.0.0.0

taskmanager.bind-host: 192.168.154.131

taskmanager.host: 192.168.154.131

taskmanager.numberOfTaskSlots: 4

rest.port: 8081

rest.address: 192.168.154.131

rest.bind-address: 0.0.0.0

4 修改masters

cd /opt/software/flink-1.18.1/conf

vim  masters

添加以下内容

192.168.154.131:8081

4 修改workers

cd /opt/software/flink-1.18.1/conf

vim  workers

添加以下内容

192.168.154.131

5 启动Flink

cd /opt/software/flink-1.18.1/bin

./start-cluster.sh

6 查看状态

jps

出现  StandaloneSessionClusterEntrypointTaskManagerRunner进程则表名flink启动成功

7 上传jar包到flink(后续连接kafkamysqlcdchive需要)

8 查看web页面

http://192.168.154.131:8081

9 停止flink

cd /opt/software/flink-1.18.1/bin

./stop-cluster.sh


评论