首先从官网下载编译好的二进制安装包并解压
wget -c https://dlcdn.apache.org/flink/flink-2.0.0/flink-2.0.0-bin-scala_2.12.tgz
tar -xzf flink-2.0.0-bin-scala_2.12.tgz
wget https://dlcdn.apache.org/hadoop/common/hadoop-3.4.1/hadoop-3.4.1.tar.gz
tar -xzvf hadoop-3.4.1.tar.gz
如果是较低版本,如1.19,需更新配置rest.bind-address 默认值为localhost,改成0.0.0.0启动完才能在外部系统正常打开flink UI。
启动服务
./bin/start-cluster.sh
下载的二进制安装包有一些提取写好的示例项目可以先跑下环境。
./bin/flink run xxx.jar
手动执行任务
Flink后台可以实时看到执行的任务,执行自己开发的任务可以在最后一个菜单Submit New Job上面提交打包好的jar包