DropVPS Team
Writer: John hens
how to install cassandra in ubuntu 25.10

Table of Contents
What you will read?
Apache Cassandra is a powerful, open-source NoSQL database that can handle large amounts of data across multiple servers with no single point of failure. Installing Cassandra on Ubuntu 25.10 is simple and helps you build scalable and high-performance applications.
Step 1: Update the System
Before installation, update your system to make sure all packages are up to date.
sudo apt update && sudo apt upgrade -y
Step 2: Install Java
Cassandra requires Java to run. Install the OpenJDK package using the following command:
sudo apt install openjdk-17-jdk -y
Check if Java is installed correctly:
java -version
Step 3: Add Apache Cassandra Repository
To get the latest and most stable version of Apache Cassandra, you need to add its official repository to your Ubuntu system before installation.
echo "deb https://debian.cassandra.apache.org 311x main" | sudo tee /etc/apt/sources.list.d/cassandra.list
curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add -
Update package information:
sudo apt update
Step 4: Install Apache Cassandra
After adding the official repository, you can install Apache Cassandra using the package manager to ensure you get the latest and most reliable version for Ubuntu 25.10.
sudo apt install cassandra -y
Then start and enable Cassandra to run automatically at boot.
sudo systemctl enable cassandra
sudo systemctl start cassandra
Step 5: Verify Cassandra Installation
After installation, it’s important to verify that Apache Cassandra is running correctly and responding to client connections on your Ubuntu system.
sudo systemctl status cassandra
You can also confirm the connection using the CQL shell:
cqlsh
Step 6: Basic Cassandra Commands
Once Cassandra is installed and running, you can start using simple CQL commands to create keyspaces, tables, and insert or retrieve data from your database.
CREATE KEYSPACE testkeyspace WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 1};
USE testkeyspace;
CREATE TABLE users (id UUID PRIMARY KEY, name text, email text);
INSERT INTO users (id, name, email) VALUES (uuid(), 'John Doe', '[email protected]');
SELECT * FROM users;