Apache Cassandra is a NoSQL database management system which is free and open-source.

Before downloading Cassandra , you should update your system and install Java 8.

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install default-jdk
CODE

To verify Java 8 is installed you can use:

$ java -version
CODE

After installing Java, you need to add Cassandra repository and Cassandra public key by following commands:

$ echo "deb http://www.apache.org/dist/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
$ sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key A278B781FE4B2BDA
CODE

After adding repository and public key, you should update your system again and you can install Cassandra by typing:

$ sudo apt update
$ sudo apt install cassandra
CODE

After that, you can start cassandra with :

$ sudo service cassandra start
CODE

Verify that cassandra is running by invoking nodetool status from the command line

$ nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 127.0.0.1 222.14 KB 256 100.0% 2a0b7fa9-23c6-40d3-83a4-e6c06e2f5736 rack1 
CODE