Apache Cassandra is an open source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. You can deploy a Cassandra cluster on a datacenter or span across multiple datacenters.
Cassandra installation:
Step 1 :

Before installing Cassandra, we must install java-8.

In some cases, Ubuntu can’t install the some softwares because that software doesn’t exist in the Ubuntu library,so that we need to add this  software into Ubuntu library and then we install the software, to install java 8, first we need to add java 8 into Ubuntu Library, for that use the following Command.

sudo add-apt-repository ppa:webupd8team/java

After adding into library update the sysyem

 sudo apt-get update

Then install java 8 using following command

$ sudo apt-get install oracle-java8-installer

After installation is completed check the java is installed by entering the following command

$ java –version

If use installed some other version of java like 6 or 7 the use the following command to set java 8 as default.

$ sudo apt-get install oracle-java8-set-default

Step 2:

After setting java 8 as default, set the java path and cassandra path in bashrc.

To open bashrc file type sudo gedit .bashrc in the terminal

cassandra installation,cassandra tutorial

# paste the following path in bashrc file and save.

export JAVA_HOME=/usr/lib/jvm/java-8-oracle

export cassandra_home=$HOME/apache-cassandra-3.3

export path=$CASSANDRA_HOME/bin

cassandra installation,cassandra tutorial

Step 3:

After entering the path in bashrc and extract the Cassandra-3.3.tar.gz file in the desired location, goto cassandra/bin folder and type Cassandra in terminal.

cassandra installation,cassandra tutorial

After entering cassandra in terminal the cassandra server will start.

cassandra installation,cassandra tutorial

Open new tab (CTRL+SHIFT+T) in the terminal and go to cassandra -> bin type the command $ cqlsh and click enter.

cassandra installation,cassandra tutorial

cqlsh> prompt will appear.

Cassandra installation completed.

Leave a Reply

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