Install Apache Cassandra on Ubuntu or SUSE

This guide shows you how to install Apache Cassandra on an Ubuntu or SUSE Linux virtual machine. Cassandra is a highly scalable NoSQL database designed for high availability and fault tolerance.

Update system packages

    

        
        

sudo apt update
  

    
    

        
        

sudo zypper refresh
sudo zypper update -y
  

    

Install Java

Cassandra requires a Java runtime environment. This example uses Java 17 for optimal performance and compatibility with Cassandra 5.0.5.

    

        
        

sudo apt install -y openjdk-17-jdk
  

    
    

        
        

sudo zypper install -y java-17-openjdk java-17-openjdk-devel
  

    

Download Cassandra

    

        
        
wget https://downloads.apache.org/cassandra/5.0.5/apache-cassandra-5.0.5-bin.tar.gz

    
Note

Apache Cassandra 5.0 is a major release introducing significant performance, usability, and scalability enhancements. Key features include Storage Attached Indexes (SAI) for flexible querying, Trie-based memtables/SSTables for better efficiency, and the Unified Compaction Strategy (UCS) for automated data management. It also supports JDK 17 for up to 20% performance gains and adds vector search for AI applications. The release marks the end-of-life for the 3.x series, urging users to upgrade for continued support. To learn more, see the Apache Cassandra 5.0 announcement .

The Arm Ecosystem Dashboard recommends Cassandra version 5.0.0 as the minimum recommended on Arm platforms.

Extract and set up Cassandra

    

        
        
tar -xvzf apache-cassandra-5.0.5-bin.tar.gz
mv apache-cassandra-5.0.5 ~/cassandra

    

Add Cassandra to PATH

To run Cassandra commands from any location, add the bin directory to your PATH environment variable:

    

        
        
echo 'export PATH="$HOME/cassandra/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

    

You can now run Cassandra or cqlsh from any terminal without specifying the full path.

Verify installation

Check the installed Cassandra version to confirm the installation:

    

        
        
cassandra -v

    

The output is similar to:

    

        
        5.0.5

        
    

Cassandra is now installed and ready for baseline testing.

Back
Next