Here Are the Steps on How Install Apache Cassandra on Ubuntu Single Cloud Server Instance. In this guide, we are helping you to go through installing Apache Cassandra, Apache Cassandra on a Ubuntu 16.04 LTS server instance. Commands for Ubuntu 18.04 LTS will be similar. You need a server instance with at least 4GB of memory. Insufficient memory will cause Apache Cassandra to exit. We will install Java on Ubuntu 16.04, then install Apache Cassandra and test Apache Cassandra installation.

Steps on How Install Apache Cassandra on Ubuntu

We will install Java 8 from the PPA repository. We have to install python-software-properties package :

Vim

1

2

3

4

5

apt update-y&&apt upgrade-y

apt install python-software-properties-y

add-apt-repository-yppa:webupd8team/java

##accept the prompt

apt update-y&&apt upgrade-y

You have two options for Java.

Option 1 for Java : Oracle Java from repository

Now you can install Java 8 :

Vim

1

apt install oracle-java8-installer-y

Accept the ‘Oracle license terms’ prompt. Verify that Java is now installed :

Vim

1

java-version

Option 2 for Java : OpenJDK JRE (easy)

Optionally, you could install OpenJDK JRE :

Vim

1

apt install openjdk-8-jre-y

Common Steps

You can create the JAVA_HOME environment variable with the following commands, $JAVA_HOME path must match :

Open the cassandra.yaml file and replace the value in the cluster_name variable with the new cluster name you just set with above command :

Vim

1

nano/etc/cassandra/cassandra.yaml

Save changes. Run this command and reboot the instance :

Vim

1

2

nodetool flush system

reboot

We guess, you have successfully installed Apache Cassandra. You understood that guides by many websites are weak at point of security even for testing purpose. Cassandra is like MySQL. Most of the DBMS are like MySQL. They needs to be tweaked, secured.