10

DISCOUNT

REGISTER NOW

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.

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

To verify Java 8 is installed you can use:

$ java -version

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

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

After that, you can start cassandra with :

$ sudo service cassandra start

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 
Have more questions? Submit a request
Powered by Zendesk