• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Debian

How to Install Apache Cassandra 3.11.x on Debian 9

How VPS by How VPS
November 1, 2019
in Debian
0
0
SHARES
19
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Using a Different System?
  2. Prerequisites
  3. Step 1: Install OpenJDK JRE 8
  4. Step 2: Install Python 2.7, if it’s missing on your system
  5. Step 3: Install the latest stable release of Apache Cassandra
  6. Step 4: Test the installation of Apache Cassandra
  7. Want to contribute?

Using a Different System?

  • How to Install Apache Cassandra 3.11.x on CentOS 7

  • How to Install Apache Cassandra 3.11.x on Ubuntu 16.04 LTS

Are we missing a guide for your target system? Request one, or submit your own!


Apache Cassandra is a free and open source NoSQL database management system that is designed to provide scalability, high availability, and uncompromised performance.

In this article, I will guide you through installing the latest stable release of Apache Cassandra, Apache Cassandra 3.11.2, on a Debian 9 server instance.

Prerequisites

  • A fresh Vultr Debian 9 x64 server instance with at least 4GB of memory. Insufficient memory will cause Apache Cassandra to exit abnormally.
  • A sudo user.
  • The server instance has been updated to the latest stable status.

Step 1: Install OpenJDK JRE 8

Apache Cassandra requires the latest release of Java 8. For that you can choose to install the latest release of OpenJDK JRE 1.8 as below:

sudo apt install openjdk-8-jre -y

Having OpenJDK JRE 1.8 installed, you can confirm the installation result:

java -version

The output will be similar to the following:

openjdk version "1.8.0_162"
OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-1~deb9u1-b12)
OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)

Optionally, you can create the JAVA_HOME environment variable as follows:

echo "JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")" | sudo tee -a /etc/profile
source /etc/profile
echo $JAVA_HOME

Step 2: Install Python 2.7, if it’s missing on your system

Apache Cassandra requires Python 2.7 rather than Python 3. If you operate Apache Cassandra in a Python 3 environment, you may have trouble launching the cqlsh shell of Apache Cassandra.

First, determine the existence and version of Python on your machine:

python -V

On Debian 9, the output normally will be:

Python 2.7.13

As you see, Python 2.7 is a built-in component on Debian 9. However, if it’s missing for some reason, you can install it by running the following command:

sudo apt-get install python

Step 3: Install the latest stable release of Apache Cassandra

Create the Apache Cassandra 3.11.x apt repo:

echo "deb http://www.apache.org/dist/cassandra/debian 311x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
sudo apt-get update

If you encounter a GPG public key error, run the following commands to add the mentioned Apache Cassandra public key, which is A278B781FE4B2BDA in this case:

sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key A278B781FE4B2BDA
sudo apt-get update

Use the newly added apt repo to install Apache Cassandra:

sudo apt-get install cassandra

Step 4: Test the installation of Apache Cassandra

Start the Apache Cassandra daemon:

sudo service cassandra start

If you want to make Apache Cassandra automatically start at system boot, run the following command:

sudo update-rc.d cassandra defaults

Next, use the nodetool program to show the status of Apache Cassandra on current node:

nodetool status

The output will resemble the following:

Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Tokens       Owns (effective)  Host ID                               Rack
UN  127.0.0.1  103.67 KiB  256          100.0%            796aceb9-9adf-41c3-be9a-22b6bb1900d8  rack1

You can use the cqlsh shell to interact with Apache Cassandra:

cqlsh localhost

The output will be similar to the following:

Connected to Test Cluster at localhost:9042.
[cqlsh 5.0.1 | Cassandra 3.11.2 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh>

For now, just type exit and then press ENTER to quit the cqlsh shell.

If you want to stop Apache Cassandra, execute the following command:

sudo service cassandra stop

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

Simple Mailserver With Postfix, Dovecot, and Sieve on Debian 9

Next Post

How to Install ARK: Survival Evolved on Debian 9

Next Post

How to Install ARK: Survival Evolved on Debian 9

Leave a Reply Cancel reply

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

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet