Hey! This is Mort!

I'm software engineer and open source enthusiast especially in C/C++ & Python and GNU/Linux.
Home Resume Github LinkedIn Twitter m@0t1.me

Install Apache Zookeeper, Kafka and Cassandra in ArchLinux 2018 Feb 02

In this tutorial we are going to install Apache Zookeeper, Kafka and Cassandra in ArchLinux. Installing this way in other Linux distribution is the same but a little bit different.

Pre installation

$ pacman -S jdk8-openjdk jre8-openjdk gradle scala
$ mkdir ~/Applications/

Zookeeper

$ wget -c http://www-us.apache.org/dist/zookeeper/stable/zookeeper-3.4.10.tar.gz
$ tar xzf zookeeper-3.4.10.tar.gz -C ~/Applications/
$ mv ~/Applications/zookeeper-3.4.10 ~/Application/zookeeper
$ cd ~/Applications/zookeeper/
$ mkdir data
$ mv conf/zoo_sample.cfg zoo.cfg

Now open conf/zoo.cfg and update dataDir variable:

dataDir=data

Now add ~/Applications/zookeeper/bin/ in $PATH to make it easy to accessible.

Now run it:

$ zkServer.sh start

Success run message contains: ... STARTED

Apache Kafka

$ wget -c http://www-us.apache.org/dist/kafka/1.0.0/kafka-1.0.0-src.tgz
$ tar xzf kafka-1.0.0-src.tgz -C ~/Applications/
$ mv ~/Applications/kafka-1.0.0 ~/Applications/kafka
$ cd ~/Applications/kafka/
$ gradle jar

Now add ~/Applications/kafka/bin/ in $PATH to make it easy to accessible.

Now run it:

$ kafka-server-start.sh ~/Applications/kafka/config/server.properties

Success run message contains: ... started (kafka.server.KafkaServer)

Cassandra

$ wget -c http://www-eu.apache.org/dist/cassandra/3.11.1/apache-cassandra-3.11.1-bin.tar.gz
$ tar xzf apache-cassandra-3.11.1-bin.tar.gz ~/Applictions/
$ mv ~/Applications/apache-cassandra-3.11.1 ~/Applications/cassandra
$ cd ~/Applications/cassandra/
$ mkdir -p data/data
$ mkdir -p data/commitlog
$ mkdir -p data/saved_caches
$ mkdir -p logs

Now add ~/Applications/cassandra/bin/ in $PATH to make it easy to accessible.

Now run it:

$ cassandra -f

Success run message contains: ... Starting listening for CQL clients on localhost/127.0.0.1:9042


All rights reserved by Morteza NourelahiAlamdari ©
All contents are under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.