The cart is empty

Apache Cassandra is a highly scalable, distributed NoSQL database designed to handle large amounts of data distributed across many servers, providing high availability without a single point of failure. Due to these characteristics, Cassandra is a popular choice for various applications, from web to financial services, where fast access to vast amounts of data is needed. In this article, we'll look at the steps required to install Apache Cassandra on a Linux system.

Prerequisites

Before installing Cassandra, make sure your system meets the following prerequisites:

  • Current version of Java (JDK), it is recommended to use OpenJDK 8 or 11.
  • Adequate free disk space to store Cassandra data.
  • At least 2 GB of RAM for basic testing environments. For production deployment, you will need more memory.

Installing Java

Cassandra requires Java. If you don't have it installed yet, you can do so using the following commands:

sudo apt update
sudo apt install openjdk-11-jdk

After the installation, verify the Java version with the command:

java -version

Adding Cassandra Repository

Cassandra can be installed from the official Apache repositories. Add the Cassandra repository to your system using the following commands:

echo "deb http://www.apache.org/dist/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
sudo apt-get update

Installing Cassandra

Now that you have added the repository, you can proceed directly to install Cassandra using the following command:

sudo apt-get install cassandra

Starting and Verifying Cassandra

After installation, start the Cassandra service and verify that it's running:

sudo systemctl start cassandra
sudo systemctl enable cassandra

You can verify that Cassandra is running by using the command:

nodetool status

The basic Cassandra configuration file can be found at /etc/cassandra/cassandra.yaml. Here you can set various configuration options including cluster, nodes, memory, and more.

 

You now have an installed and running instance of Apache Cassandra. Cassandra is a robust and scalable solution for working with large volumes of data. Before deploying to production, it is recommended to thoroughly familiarize yourself with Cassandra's configuration and cluster management to fully leverage its potential.