Once you download the latest version of Apache Kafka, remember to extract it.
To run Kafka, remember that your local environment must have Java 8+ installed on it.
If you want to start the Kafka server, the following commands have to be run in order so that all the services can be started in the correct order:
Start the ZooKeeper service:
$bin/zookeeper-server-start.sh config/zookeeper.properties
Open another terminal and run the following to start the Kafka broker service:
$ bin/kafka-server-start.sh config/server.properties