1.

Explain steps for Kafka installation?

Answer»

One can easily FOLLOW the below steps to install Kafka :

STEP 1: Ensuring java is installed on the MACHINE by running below command in CMD :

$ java -version

You will be able to see a version of java if it is installed. In case Java is not installed we can follow below steps to install java successfully:

1: Download the latest JDK by visiting below link: JDK

2: Extract the executables and then move to Opt directory.

3: Next step is setting the local path for the JAVA_HOME variable. We can set this by running below command in  

            ~/.bashrc file.

4: Ensure above changes are in sync in the running system along with making changes in java alternative  by invoking 

                 command

Step 2: Next step is ZooKeeper framework installation by visiting the below link: ZooKeeper

1: Once the files have been extracted we need to modify the config file before starting ZooKeeper server. We can follow below command to open “conf/zoo.cfg”


After making the changes ensure config file get saved before executing the following command to start the server :

$bin/zkServer.sh start

Once you execute above command below response can be seen:

$JMX enabled by default $Using config: /Users/../zookeeper-3.4.6/bin/../conf/zoo.cfg $Starting zookeeper ...STARTED

 2: Next step is starting CLI

$ bin /zkCli.sh The above command will ensure we connect to zookeeper and below response will come:

Connecting to localhost:2181

……………………

……………………

…………………….

Welcome to ZooKeeper!

……………………

……………………

WATCHER::

WatchedEvent state:SyncConnected type: None path:null

[zk: localhost:2181(CONNECTED) 0]

We can also stop the ZooKeeper server after doing all the basic validations :

Step 3: Now we can move to apache Kafka installation by visiting the below link: Kafka

       Once Kafka is downloaded locally we can extract the files by running the command :

The above command will ensure Kafka installation. After Kafka installation we need to start Kafka server:

  • > bin/kafka-server-start.sh config/server.properties
  • [2013-04-22 15:01:47,028] INFO Verifying properties (kafka.utils.VerifiableProperties)
  • [2013-04-22 15:01:47,051] INFO Property socket.send.buffer.bytes is overridden to 1048576
  • (kafka.utils.VerifiableProperties)...


Discussion

No Comment Found