Skip to content

emka.web.id

menulis pengetahuan – merekam peradaban

Menu
  • Home
  • Tutorial
  • Search
Menu

How to Install Apache Cassandra on Debian 11 / Debian 10

Posted on August 29, 2021

Apache Cassandra, or simply Cassandra, is an open-source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure.

Every Cassandra node in the cluster will have the same role. Data is distributed across the cluster, which means each node holds different data. Also, it supports replication and multi-datacenter replication for redundancy, failover, and disaster recovery.

Here, we will see how to install Apache Cassandra on Debian 11 / Debian 10.

Install Java

Update repository index.

sudo apt update

Apache Cassandra requires the latest version of Java 8. But, OpenJDK 8 is not available in Debian 11/10. Also, Cassandra 4.0  supports Java 11 (EXPERIMENTAL). So, we will use OpenJDK 11 in place of OpenJDK 8.

# Debian 11 sudo apt install -y openjdk-11-jre # Debian 10 sudo apt install -y openjdk-8-jre

Check the Java version post the installation of OpenJDK.

java -version

You will get similar output like below.

openjdk version "11.0.12" 2021-07-20 OpenJDK Runtime Environment (build 11.0.12+7-post-Debian-2) OpenJDK 64-Bit Server VM (build 11.0.12+7-post-Debian-2, mixed mode, sharing)

Add Apache Cassandra Repository

We will install Cassandra using the official Debian repository provided by Apache Software Foundation.

First, add the public key of the Cassandra repository to the system.

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

Add Cassandra repository to your system with the below command.

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

Install Apache Cassandra on Debian

First, update the repository index.

sudo apt update

Then, install Cassandra with the below command.

sudo apt install -y cassandra

You can find Cassandra’s configuration files in /etc/cassandra and the logs and data are in /var/log/cassandra/ and /var/lib/cassandra, respectively.

Ensure Cassandra is up and running with the below command.

sudo systemctl status cassandra

You will get similar output like below.

● cassandra.service - LSB: distributed storage system for structured data Loaded: loaded (/etc/init.d/cassandra; generated) Active: active (running) since Sat 2021-08-28 12:22:57 CDT; 21min ago Docs: man:systemd-sysv-generator(8) Process: 5336 ExecStart=/etc/init.d/cassandra start (code=exited, status=0/SUCCESS) Tasks: 69 (limit: 2321) Memory: 1.3G CPU: 1min 7.794s CGroup: /system.slice/cassandra.service └─5461 java -ea -da:net.openhft... -XX:+UseThreadPriorities -XX:+HeapDumpOnOutOfMemoryError -Xss256k -XX:+AlwaysPreTouch -XX:-UseBiasedLocking -XX:+UseTLA> Aug 28 12:22:57 debian11.itzgeek.local systemd[1]: Starting LSB: distributed storage system for structured data... Aug 28 12:22:57 debian11.itzgeek.local systemd[1]: Started LSB: distributed storage system for structured data. 

Verify Apache Cassandra Cluster

Wait for a minute to let the cluster comes online. Then, you can verify the Cassandra cluster by executing the below command.

sudo nodetool status

The below output confirms that the Cassandra cluster is up and running.

Datacenter: datacenter1 ======================= Status=Up/Down |/ State=Normal/Leaving/Joining/Moving --  Address    Load       Tokens  Owns (effective)  Host ID                               Rack UN  127.0.0.1  69.05 KiB  16      100.0%            fb0e8bf7-dcf4-41a6-96de-e8f230f1b797  rack1 

Means,
U – Cluster is UPN – Cluster is Normal

Connect to the Cassandra cluster using the cqlsh command.

cqlsh

You are now connected to the cluster.

Connected to Test Cluster at 127.0.0.1:9042 [cqlsh 6.0.0 | Cassandra 4.0.0 | CQL spec 3.4.5 | Native protocol v5] Use HELP for help. cqlsh>

Sumber: disini

Terbaru

  • Your Pocket-Sized Doctors: 3 Health Apps Changing the Game on Android and iOS
  • Waymo Bawa Teknologi ‘Liquid Glass’ untuk Mobil Otonom
  • Rumor Google Akan Update UI Besar-besaran Desember 2025
  • Gemini Akan Masuk di Android Auto, Mobil Jadi Lebih Smart!
  • OpenAI Bantah Rencana Pasang Iklan di ChatGPT Berlangganan
  • Kenapa Komputer Sangat Panas Saat Gunakan Fitur Virtualisasi Hyper-V?
  • Apa itu Bug React2Shell? Sudah Serang Lebih dari 30 Organisasi dan 77.000 IP Address
  • Google Store Black Friday 2025: Penawaran Spesial untuk Pixel, Nest, dan Lainnya!
  • Boxville 2 Gratis di Playstore, Plus Diskon Lainnya!
  • Cara Atasi Masalah Pembacaan Suara (Read Aloud) di Windows Copilot Tidak Berfungsi
  • Kementerian Kesehatan Inggris Akui Data Breach, Akibat Zero-day Oracle DB?
  • Google Akan Perkenalkan Autofill Google Wallet di Chrome untuk Pembayaran Lebih Mudah
  • Google Pixel Akan Perkenalkan Launcher Device Search Baru, Lebih Cepat dan Pintar
  • Hacker Serang Bug VPN di ArrayOS AG untuk Menanam Web Shell
  • Cara Menonaktifkan Error “ITS Almost time to restart in Windows”
  • Google Fi Mendukung Panggilan Telepon RCS Melalui Web, Lebih Mudah dan Efisien
  • Data Breach Marquis: Hajar Lebih Dari 74 Bank dan Koperasi AS
  • Google Search Akan Adopsi ‘Continuous Circle’ untuk Hasil Pencarian Terjemahan, Lebih Cerdas dan Kontekstual
  • Rusia Memblokir Roblox Karena Distribusi ‘Propaganda LGBT’
  • Google Gemini Redesain Web Total di Desember 2025, Fokus UX yang Lebih Baik
  • Apa itu Google Workspace Studio? Tool Baru untuk Pembuat Konten?
  • Cara Menggunakan Xbox Full-Screen Experience di Windows
  • Korea Tahan Tersangka Terkait Penjualan Video Intim dari Kamera CCTV yang Diretas
  • Kebocoran Galaxy Buds 4 Mengungkap Desain dan Fitur Baru, Mirip Apple?
  • Sudah Update Windows KB5070311 dan Apa Saja Yang Diperbaiki?
  • Cara Menonaktifkan Fitur AI Actions (Tindakan AI) di Menu Windows Explorer
  • Microsoft Edge AI vs. OpenAI’s Atlas Browser: Perbandingan dan Perbedaan Utama
  • Cara Memasang Folder Sebagai Drive di Windows 11
  • Cara Memperbaiki Error 0xC1900101 0x40021 pada Update Windows 11
  • Malware Glassworm Serang Lagi VSCode, Hati-hati!
  • Your Pocket-Sized Doctors: 3 Health Apps Changing the Game on Android and iOS
  • Waymo Bawa Teknologi ‘Liquid Glass’ untuk Mobil Otonom
  • Rumor Google Akan Update UI Besar-besaran Desember 2025

©2025 emka.web.id | Design: Newspaperly WordPress Theme