October 21, 2021
How to install apache Singa

How To Install Apache Cassandra 4.0 On Debian 11

On this tutorial we will learn how to install Apache Cassandra 4.0 on Debian 11 (Bulleyes) operating system.


Apache Cassandra has been used by many companies on handle their daily operation, such as : Netflix, Facebook, Cisco, Hulu, Twitter. Cassandra was developed at Facebook to power the Facebook inbox search feature, and then Facebook released Cassandra as an open-source project on Google code in July 2008. Apache Cassandra is open-source high-performance NoSQL database management system designed to handle large amounts of data across many commodity servers, providing fault tolerance, linear scalability, and consistency across multiple nodes. Each Cassandra node in the cluster will have a similar job. Data is circulated over the bunch which implies every node holds various information. On this tutorial, we will show you how to install the latest version of Apache Cassandra (version 4.0) on Debian 1 operating system.

Apache Cassandra 4.0 New features

Apache Cassandra new version has several new improved features, as shown below :

  1. Support Java 11
  2. Apache Cassandra 4.0 implements virtual tables
  3. Audit logging. All database activity is logged per-node as file-based records to a specified local filesystem directory. The audit log files are rolled periodically based on a configurable value.
  4. Full Query Logging. This feature is useful for live traffic capture, as well as traffic replay. The tool provided can be used for both debugging query traffic and migration.
  5. Improved Internode Messaging
  6. Transient Replication

Apache Cassandra Installation on Debian 11

The Apache Cassandra 4.0 installation will be divided into several subsections, namely:

1. Prerequisites

  • As stated on Apache Cassandra documentation, if Cassandra requires the latest version of Java 8 to be running smoothly on the system. Also, Cassandra 4.0 supports Java 11 (as Experimental support).Then we will use OpenJDK 11 in place of OpenJDK 8.
  • The latest version of Python 2.7 or Python 3.6 +.
  • A user with sudo privileges and sufficient space ready on the system.

Checking Java Version

We will verify all required dependencies package/software, if not, then we will do the installation. Java checking. we will verify, if the Java has been installed on the system by typing command line : java -version.

ramansah@otodiginet:~$ java -version 
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)

if we haven’t installed java 11, then please carry out the installation immediately. an article on installing java 11 can be found at https://otodiginet.com/software/how-to-install-java-11-openjdk-11-on-debian-11/.

2. Adding Apache Cassandra Repository

On this step, we will add the Apache repository of Cassandra to the file cassandra.sources.list.

  • Adding Cassandra repository to the system by typing command line :
echo "deb https://downloads.apache.org/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
  • Adding the public key of the Cassandra repository to the system, by using curl command line, we will type the command line :
curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add -
ramansah@otodiginet:~$ curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
100  267k  100  267k    0     0  61909      0  0:00:04  0:00:04 --:--:-- 63193

3. Installing Apache Cassandra

At this section, we will update the repository index, by typing the command line : sudo apt update.

ramansah@otodiginet:~$ sudo apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease                                               
Hit:2 http://ftp.debian.org/debian stretch-backports InRelease                                      
Hit:3 http://security.debian.org/debian-security bullseye-security InRelease                        
Hit:4 http://deb.debian.org/debian bullseye-updates InRelease                                       
Hit:5 http://deb.debian.org/debian bullseye-backports InRelease
Get:6 https://downloads.apache.org/cassandra/debian 40x InRelease [3,902 B]
Get:7 https://downloads.apache.org/cassandra/debian 40x/main amd64 Packages [685 B]
Fetched 4,587 B in 3s (1,317 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

and then we just install the Cassandra, by typing command line : sudo apt install -y cassandra.

ramansah@otodiginet:~$ sudo apt install -y cassandra
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 47.3 MB of archives.
After this operation, 58.5 MB of additional disk space will be used.
Get:1 https://downloads.apache.org/cassandra/debian 40x/main amd64 cassandra all 4.0.1 [47.3 MB]
Fetched 47.3 MB in 1min 51s (425 kB/s)                                                              
Selecting previously unselected package cassandra.
(Reading database ... 136457 files and directories currently installed.)
Preparing to unpack .../cassandra_4.0.1_all.deb ...
Unpacking cassandra (4.0.1) ...
Setting up cassandra (4.0.1) ...
Adding group `cassandra' (GID 123) ...
vm.max_map_count = 1048575
net.ipv4.tcp_keepalive_time = 300
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
nstall Apaceh Cassandra 4.0
Install Apaceh Cassandra 4.0

By default, Apache Cassandra will be running after installation was completed done successfully. And then we will verify the Cassandra installation by checking its Status, by typing command line : sudo systemctl status cassandra.

ramansah@otodiginet:~$ sudo systemctl status cassandra
● cassandra.service - LSB: distributed storage system for structured data
     Loaded: loaded (/etc/init.d/cassandra; generated)
     Active: active (running) since Fri 2021-09-24 12:37:11 EDT; 1min 5s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 7487 ExecStart=/etc/init.d/cassandra start (code=exited, status=0/SUCCESS)
      Tasks: 58 (limit: 4623)
     Memory: 1.4G
        CPU: 15.289s
     CGroup: /system.slice/cassandra.service
             └─7595 /usr/bin/java -ea -da:net.openhft... -XX:+UseThreadPriorities -XX:+HeapDumpOnOut>

Sep 24 12:37:11 otodiginet systemd[1]: Starting LSB: distributed storage system for structured data.>
Sep 24 12:37:11 otodiginet systemd[1]: Started LSB: distributed storage system for structured data.
Apache Cassandra Services
Apache Cassandra Services

So far, we have Apache Cassandra 4.0 installed on the system.

4. Verify Apache Cassandra Cluster

The next step in installing Cassandra is to check the status of Cassandra by typing command line : sudo nodetool status Alternatively, connect to the database by typing command line : cqlsh.

ramansah@otodiginet:~$ sudo nodetool status
Datacenter: datacenter1
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Tokens  Owns (effective)  Host ID                               Rack
UN  69.04 KiB  16      100.0%            e014e9c1-7c2c-4c4f-9c76-f8981a0c5b75  rack1
ramansah@otodiginet:~$ cqlsh
Connected to Test Cluster at
[cqlsh 6.0.0 | Cassandra 4.0.1 | CQL spec 3.4.5 | Native protocol v5]
Use HELP for help.
Cassandra nodetool status


We have shown you, how to instal apache NiFisystem. I hope this article will be useful for who need a Article abou Odoo installaion to Linu.

Share this article via :

Leave a Reply

Your email address will not be published. Required fields are marked *