إعداد Kafka محليًا
اكتسب خبرة عملية من خلال تثبيت عنقود Kafka أحادي العقدة وإعداده على جهازك المحلي
إعداد Kafka محليًا درس مجاني في Apache Kafka & Stream Processing Fundamentals على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 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 محليًا» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Apache Kafka & Stream Processing Fundamentals، انتقل إلى CoddyKit PRO. تتضمن دورة Apache Kafka & Stream Processing Fundamentals 4 دروس في المجموع.
ماذا ستتعلم في «إعداد Kafka محليًا»؟
اكتسب خبرة عملية من خلال تثبيت عنقود Kafka أحادي العقدة وإعداده على جهازك المحلي تتمرن على Apache Kafka & Stream Processing Fundamentals مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 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 يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- ما هو Apache Kafka؟
- المفاهيم الأساسية في Kafka: الوسطاء والموضوعات
- إعداد Kafka محليًا
- سجل الالتزام: كيف يخزّن Kafka البيانات