Development

How to Install Apache Flink on Linux

Captain Salem 1 min read

How to Install Apache Flink on Linux

Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments and perform computations at in-memory speed and any scale*.

Flink is designed to process continuous streams of data at a lightning-fast pace. This tutorial will guide you on how to download the latest version of Apache Flink, install, and run it.

Apache Flink can run on any Unix-Like environment, such as Linux, macOS, Cygwin, etc. It is required to have at least Java JDK 11 installed on your machine.

You can check the java version by typing the command below in your terminal.

java --version

Output:

openjdk 17.0.4.1 2022-08-12 LTS
OpenJDK Runtime Environment Corretto-17.0.4.9.1 (build 17.0.4.1+9-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.4.9.1 (build 17.0.4.1+9-LTS, mixed mode, sharing)

Check this tutorial to learn how to install Java JDK on Ubuntu -> https://www.geekbits.io/how-to-install-amazon-corretto-jdk-on-ubuntu/

Next, download the latest binary release of Apache Flink from the link below and extract the archive:

https://flink.apache.org/downloads.html

Extract the archive:

tar -xzf ~/Downloads/flink-*.tgz

Navigate into the directory and list files

cd ~/Downloads/flink-** && ls -l

Some essential directories to note down include;

  • bin/ directory contains the flink binary as well as several bash scripts that manage various jobs and tasks
  • conf/ directory contains configuration files, including flink-conf.yaml
  • examples/ directory contains sample applications that can be used as is with Flink

To start the local cluster, run the script:

./bin/start-cluster.sh

Flink should start and run as a background process. You can check the status with the command:

ps aux | grep flink

To access the flink dashboard, navigate to locahost:8081

./bin/stop-cluster.sh

Done

Share
Comments
More from Cloudenv

Cloudenv

Developer Tips, Tricks and Tutorials.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Cloudenv.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.