Install Apache Cassandra on Ubuntu Linux

Install Apache Cassandra on Ubuntu

It is easy to install Apache Cassandra NoSQL database on Ubuntu linux directly from Apache Software Foundation (ASF) reposirtory .  Before Installing the cassandra you need to install and export the JAVA to your environment .



Add the below lines in /etc/apt/source.list file for apache-cassandra  ASF repository

deb 11x main
deb-src 11x main

here 11x is the version of  Apache Cassandra 1.1.X ,  If you want to install below version please change it as 10x for 1.0.x , 08x for the 0.8.x series, etc .

Run the command

 $ sudo apt-get update

At the time of update, the below error will occur

“GPG error: unstable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY F758CE318D77295D”

This is due to the absence of public key , To add public key

$ gpg --keyserver --recv-keys F758CE318D77295D
$ gpg --export --armor F758CE318D77295D | sudo apt-key add -

here “F758CE318D77295D” it will be replaced to what you get in the end of the above error .

Now again run the update command # apt-get update

$ sudo apt-get update

Now install Cassandra using the below command

$ sudo apt-get install cassandra

To start Cassandra service

$ sudo /etc/init.d/cassandra start

Install Cassandra from tar package

Download the tar package of Apache cassandra from below link

$  sudo wget

Extract the downloaded tar package .

$ sudo  tar -xzvf apache-cassandra-1.2.1-src.tar.gz

To start Cassandra service from extracted tar package , go to extracted folder and  run the below command

$ sudo bin/cassandra  -f

Leave a Reply

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