Kafka CentOS Installation Instructions

Kafka CentOS Installation Instructions

If you’re here, you’re probably knows what `Kafka` is and what it should be used for.
If not, visit Apache Kafka page to learn more


  • wget (yum install wget)
  • tar (yum install tar)


First thing, lets go over to Kafka Download page to download kafka into our machine:

# choose a directory to download kafka into. it could be really anywhere:
# /home, /var, /usr, /opt or even /tmp if you just wanna play with it.
cd /opt
wget http://apache.mivzakim.net/kafka/
tar -zxvf kafka_2.10-
rm kafka_2.10- -y
cd kafka_2.10-

Well.. and that’s preety it. you have Kafka CentOS installation on your machine. Now, lets play with it a little:

Start quick-and-dirty server

from Kafka QuickStart:

Kafka uses ZooKeeper so you need to first start a ZooKeeper server if you don’t already have one. You can use the convenience script packaged with kafka to get a quick-and-dirty single-node ZooKeeper instance.

so just run now at your console:

bin/zookeeper-server-start.sh config/zookeeper.properties

after, you’ll see the BEAUTIFUL output telling you everything is fine and zookeeper is running on

Kafka CentOS

Kafka CentOS

Now, we’re gonna be more dirtier and just for now, we’ll move the zookeeper server into background so we could start the kafka server. This can be done by pressing: CTRL+Z which outputs:

[1]+ Stopped bin/zookeeper-server-start.sh config/zookeeper.properties

Then run the command:

> [1]+ bin/zookeeper-server-start.sh config/zookeeper.properties &

# you can check that zookeeper is running at background by use the jobs command:
> [1]+ Running bin/zookeeper-server-start.sh config/zookeeper.properties &

Now start the Kafka server:

bin/kafka-server-start.sh config/server.properties

And look as the PRETTY lines are printing and loading your Kafka server instance.



FATAL Fatal error during KafkaServerStartable startup. Prepare to shutdown (kafka.server.KafkaServerStartable)

If you get this error, you need to add your hostname to /etc/hosts: localhost myhostname


What’s now?

That’s it, you have Kafka CentOS installation! Go from STEP 3 in the quickstart to learn the basics of Kafka..


Good Luck!

1 thought on “Kafka CentOS Installation Instructions

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.