installing cassandra linux windows

10/11/2025

Installing Apache Cassandra on Linux and Windows step-by-step

Go Back

Installing Cassandra on Linux and Windows: A Step-by-Step Guide

Apache Cassandra is a highly scalable, open-source NoSQL database designed to handle large volumes of data with high availability and no single point of failure. Whether you’re setting up a local development environment or deploying it in production, understanding how to install Cassandra on Linux and Windows is essential for developers and data engineers.

In this guide, we’ll walk through the installation process for Apache Cassandra on both Linux and Windows systems, along with best practices for configuration and setup.


Installing Apache Cassandra on Linux and Windows step-by-step

What You’ll Learn

  • Prerequisites for installing Cassandra

  • Step-by-step installation on Linux (Ubuntu/CentOS)

  • Installation on Windows

  • Basic verification commands

  • Tips for post-installation configuration


Prerequisites

Before installing Cassandra, ensure that the following requirements are met:

  • Java (JDK 8 or 11) is installed and configured.

  • Python 3 is available (for cqlsh utility).

  • Sufficient system memory and disk space (at least 4GB RAM).

  • Administrative or root access to the system.

To check Java installation:

java -version

Installing Cassandra on Linux (Ubuntu/Debian)

Step 1: Update Your Package List

sudo apt update

Step 2: Install Java

sudo apt install openjdk-11-jdk -y

Verify Java:

java -version

Step 3: Add the Cassandra Repository

echo "deb https://debian.cassandra.apache.org 41x main" | sudo tee /etc/apt/sources.list.d/cassandra.list

Step 4: Add the Apache Cassandra GPG Key

curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add -

Step 5: Install Cassandra

sudo apt update
sudo apt install cassandra -y

Step 6: Start Cassandra Service

sudo systemctl enable cassandra
sudo systemctl start cassandra

Step 7: Verify Installation

nodetool status

If Cassandra is running, you’ll see the node status as UN (Up/Normal).


Installing Cassandra on Windows

Step 1: Install Java

Download and install JDK 11 from Oracle or OpenJDK, then add it to your PATH environment variable.

Step 2: Install Python (Optional for cqlsh)

Download Python from python.org and ensure it’s added to PATH.

Step 3: Download Cassandra

Step 4: Extract Files

Unzip the downloaded file to a preferred location, for example:

C:\apache-cassandra\

Step 5: Configure Environment Variables

Add the Cassandra bin directory to your system PATH:

C:\apache-cassandra\bin

Step 6: Start Cassandra

Open Command Prompt and navigate to the Cassandra bin folder:

cd C:\apache-cassandra\bin
cassandra.bat

Step 7: Verify Installation

To check if Cassandra is running, open another terminal and run:

cqlsh

If successful, you’ll enter the Cassandra Query Language shell.


Post-Installation Configuration

  1. Modify cassandra.yaml:

    • Located in the /etc/cassandra/ directory (Linux) or conf/ (Windows).

    • Configure cluster name, seeds, and listen address.

  2. Check Logs:

    tail -f /var/log/cassandra/system.log
    
  3. Access CQL Shell:

    cqlsh
    
  4. Verify Cluster Health:

    nodetool status
    

Best Practices

  • Always install a supported Java version for Cassandra’s release.

  • Tune heap size and GC settings in jvm.options for better performance.

  • For production environments, set up multi-node clusters with proper replication.

  • Use authentication and SSL for secure deployments.


Conclusion

Installing Apache Cassandra on Linux and Windows is straightforward once you understand the prerequisites and setup steps. With Cassandra up and running, you can start building high-performance, distributed applications that scale effortlessly.

By following this guide, you’ll ensure a clean, efficient installation and a properly configured environment for your NoSQL data workloads.