I am not sure what you expect by easy way. But here are the steps to install Kafka:
You can install Kafka with the help of Zookeeper(installation link here).
First, we need to get the kafka files. You can download it from the following website:
https://kafka.apache.org/downloads
Extract the file using:
$ tar -xvf kafka-2.1.1-src.tgz
Next, you have to configure kafka server
In the kafka directory, search for server.properties and open it with a text editor:
$ cd /kafka-2.1.1-src/config/
$ nano server.properties
Add the following line at the end of the file:
delete.topic.enable = true
This will allow us to delete kafka topic (it is disabled by default)
Next, open the zookeeper.service file:
$ sudo nano /etc/systemd/system/zookeeper.service
And add the below entries:
[Unit]
Requires=network.target remote-fs.target
After=network.target remote-fs.target
[Service]
Type=simple
User=kafka
ExecStart=/home/kafka/kafka/bin/zookeeper-server-start.sh /home/kafka/kafka/config/zookeeper.properties
ExecStop=/home/kafka/kafka/bin/zookeeper-server-stop.sh
Restart=on-abnormal
[Install]
WantedBy=multi-user.target
And finally, create systemd service:
Open the kafka.service file:
$ sudo nano /etc/systemd/system/kafka.service
And add the following entries:
[Unit]
Requires=zookeeper.service
After=zookeeper.service
[Service]
Type=simple
User=kafka
ExecStart=/bin/sh -c '/home/kafka/kafka/bin/kafka-server-start.sh /home/kafka/kafka/config/server.properties > /home/kafka/kafka/kafka.log 2>&1'
ExecStop=/home/kafka/kafka/bin/kafka-server-stop.sh
Restart=on-abnormal
[Install]
WantedBy=multi-user.target
Lastly, to start kafka service, run:
$ sudo systemctl start kafka
Hope this helps!
To know more about Kafka, I would recommend you to enroll with Kafka training online today.
Thanks.