Sunday, April 20, 2025

How to Install Apache Flink on Ubuntu


Apache Flink is a powerful open-source framework for distributed stream and batch data processing. This guide walks you through the steps to install Flink on an Ubuntu system.

🛠️ Prerequisites

  • Ubuntu system (20.04 or later recommended)
  • Java 8 or Java 11 installed
  • Internet connection and basic terminal knowledge

🔧 Step 1: Install Java

Apache Flink requires Java to run. You can install OpenJDK 11 using the following command:

    sudo apt update
    sudo apt install openjdk-11-jdk -y

Verify Java installation:

    java -version

📦 Step 2: Download Apache Flink

Visit the official Flink download page to get the latest version. You can also use the command line:

    wget https://downloads.apache.org/flink/flink-1.17.1/flink-1.17.1-bin-scala_2.12.tgz

📁 Step 3: Extract Flink

    tar -xvzf flink-1.17.1-bin-scala_2.12.tgz
    cd flink-1.17.1

🚀 Step 4: Start Flink

Flink comes with a built-in local cluster. You can start it using the following script:

    ./bin/start-cluster.sh

This will start both the JobManager and TaskManager on your local machine.

🌐 Step 5: Access Flink Web UI

After starting the cluster, you can access the Flink dashboard at:

    http://localhost:8081

🛑 Stopping Flink

    ./bin/stop-cluster.sh

✅ Conclusion

You're now ready to run and develop Flink jobs on your Ubuntu machine! Stay tuned for more tutorials on writing and submitting Flink jobs.


📚 Also Read: How to Set Up Apache Flink on WSL (Windows Subsystem for Linux)

📚 Also Read: Quiz on Introduction to Apache Flink

0 comments:

If you have any doubts,please let me know