0Pricing
Apache Kafka & Stream Processing Fundamentals · บทเรียน

การตั้งค่า Kafka ภายในเครื่อง

ลงมือปฏิบัติด้วยการติดตั้งและกำหนดค่าคลัสเตอร์ Kafka แบบโหนดเดียวบนเครื่องของคุณ

การตั้งค่า Kafka ภายในเครื่อง เป็นบทเรียน Apache Kafka & Stream Processing Fundamentals ฟรีบน CoddyKit นี่คือบทเรียนที่ 3 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Apache Kafka & Stream Processing Fundamentals และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Apache Kafka & Stream Processing Fundamentals มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

Why Local Kafka Setup?

Let's run Kafka on your own machine — perfect for learning, testing, and development. A local setup is your personal sandbox, no cloud required.

Prerequisites: Java & OS

First, the prerequisites: JDK 8+ (Kafka runs on the JVM) and any major OS — Linux, macOS, or Windows via WSL. Check with java -version.

Download Kafka Binary

Now download the Kafka binary from the official Apache site — grab the latest stable release. The shown curl command pulls it straight to your machine.

Extract Kafka Files

Next, extract the downloaded .tgz archive with tar -xzf, then cd into the new folder. You're now inside the Kafka install directory.

Understanding ZooKeeper's Role

ZooKeeper is the distributed coordinator Kafka has long used to track brokers and store metadata. Newer Kafka uses KRaft instead, but ZooKeeper is still common for learning.

Starting ZooKeeper Server

Start ZooKeeper (bundled with Kafka) using the shown command. It'll spew logs — keep this terminal open, since ZooKeeper has to stay running.

Kafka Broker: The Data Hub

A Kafka broker is the server running the Kafka process — the heart of the cluster. It stores messages in topics and serves producers and consumers. We'll run one locally.

Starting Kafka Broker

With ZooKeeper up, open a new terminal and start the broker with the shown command. Keep it running too — you now have a single-node Kafka cluster live.

Verify Your Setup

Confirm it works: in a new terminal, create a test topic with the shown kafka-topics.sh command. No errors means your local Kafka is running.

Setup Steps Check

You've just learned the steps to get Kafka running locally. Can you put them in the correct order?

Local Setup Recap

You did it — a local Kafka cluster is running. You installed Java, extracted the binaries, started ZooKeeper and the broker, and verified with a test topic. Next: producing and consuming.

คำถามที่พบบ่อย

บทเรียน “การตั้งค่า Kafka ภายในเครื่อง” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “การตั้งค่า Kafka ภายในเครื่อง” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Apache Kafka & Stream Processing Fundamentals ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Apache Kafka & Stream Processing Fundamentals มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “การตั้งค่า Kafka ภายในเครื่อง”

ลงมือปฏิบัติด้วยการติดตั้งและกำหนดค่าคลัสเตอร์ Kafka แบบโหนดเดียวบนเครื่องของคุณ คุณปฏิบัติ Apache Kafka & Stream Processing Fundamentals ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Apache Kafka & Stream Processing Fundamentals หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน Apache Kafka & Stream Processing Fundamentals บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 3 จากทั้งหมด 4 บทเรียน

บทเรียน “การตั้งค่า Kafka ภายในเครื่อง” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน Apache Kafka & Stream Processing Fundamentals นี้ได้ไหม

ได้ บทเรียน Apache Kafka & Stream Processing Fundamentals ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. Apache Kafka คืออะไร
  2. แนวคิดหลักของ Kafka: โบรกเกอร์และหัวข้อ
  3. การตั้งค่า Kafka ภายในเครื่อง
  4. บันทึกการคอมมิต: วิธีที่ Kafka จัดเก็บข้อมูล
← กลับไปที่ Apache Kafka & Stream Processing Fundamentals