Skip to main content
Skip table of contents

How to Install Apache Cassandra on Ubuntu 16.04 Instance

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.

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

To verify Java 8 is installed you can use:

CODE
$ java -version

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

CODE
$ 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

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

CODE
$ sudo apt update
$ sudo apt install cassandra

After that, you can start cassandra with :

CODE
$ sudo service cassandra start

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

CODE
$ 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 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.