Updated: 28 September 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9 (Cassandra 5.0)
Ubuntu 17.04 and CentOS 7 are end of life. Apache Cassandra is a distributed NoSQL database for large amounts of data across many servers. The current version is 5.0; these steps are for Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9.
Requirements
- Java 11 or 17:
apt install openjdk-17-jre-headless(Ubuntu/Debian) ordnf install java-17-openjdk-headless(AlmaLinux/Rocky). - At least 4 GB RAM for a small node (8 GB or more recommended). Cassandra is meant to run as a cluster of several servers.
Install Apache Cassandra 5.0
# Ubuntu 24.04 / Debian 12 curl -o /etc/apt/keyrings/apache-cassandra.asc https://downloads.apache.org/cassandra/KEYS echo "deb [signed-by=/etc/apt/keyrings/apache-cassandra.asc] https://debian.cassandra.apache.org 50x main" > /etc/apt/sources.list.d/cassandra.list apt update && apt install cassandra
On AlmaLinux/Rocky, create /etc/yum.repos.d/cassandra.repo:
[cassandra] name=Apache Cassandra baseurl=https://redhat.cassandra.apache.org/50x/ gpgcheck=1 repo_gpgcheck=1 gpgkey=https://downloads.apache.org/cassandra/KEYS
Then dnf install cassandra and systemctl enable --now cassandra.
Check and use
nodetool status # UN = Up and Normal
cqlsh # the CQL shell
CREATE KEYSPACE shop WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
The configuration is in /etc/cassandra/cassandra.yaml. For a cluster, set the same cluster_name, the seeds, and listen_address / rpc_address on each node.
Note: Cassandra listens on several ports (7000 between nodes, 9042 for clients). Allow them only between your own servers.