Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install Apache Cassandra on Debian 10 - DesignLinux

Aug 31 2020
designlinux 0 Comments
How to Install Apache Cassandra on Debian 10

Apache Cassandra is an open-source NoSQL database system with high availability and without compromising performance. It is used by many large companies like Github, NetFlix, Reddit and Instagram. In this described how to install Apache Cassandra on Debian 10 Buster.

Prerequisites#

You should logged in as root or user with sudo privileges.

Step 1 – Install Java#

To install the latest Apache Cassandra version 3.11 requires OpenJDK 8 to be installed on your Debian system. So first we will enable AdoptOpenJdk repository and install pre-built OpenJDK 8 by running following command:

sudo apt update
sudo apt install apt-transport-https ca-certificates wget dirmngr gnupg software-properties-common

Import the repository’s GPG key and add the AdoptOpenJDK APT repository to your system:

wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/

Install Java 8 by running the following commands:

sudo apt update
sudo apt install adoptopenjdk-8-hotspot

Once the process completed, verify the Java installation by typing:

java -version

The output should look something like this:

openjdk version "1.8.0_232"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)

Step – 2 Add Repository & Import GPG Key#

Next, you need to add repository for the Apache Cassandra and import the GPG key using wget to the system:

wget -q -O - https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -
sudo sh -c 'echo "deb https://www.apache.org/dist/cassandra/debian 311x main" > /etc/apt/sources.list.d/cassandra.list'

It will not return any output.

Step 3 – Install Apache Cassandra#

You are now ready to install Cassandra on your Debian system.

Update the repository package list:

sudo apt update

Finally, run the following command to install Apache Cassandra:

sudo apt install Cassandra

Apache Cassandra service will automatically start after the installation process is complete.

Step 4 – Verify Apache Cassandra Installation#

After that, to check the Cassandra installed and running properly, type:

nodetool status

It should show output something like below:

Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load        Tokens       Owns (effective)  Host ID                               Rack
UN  127.0.0.1  103.71 KiB  256          100.0%            dd8f6709-08ef-45b8-881e-5c1b5bbfc7f7  rack1

That’s it. At this step, Apache Cassandra is installed on your Debian server.

Step 5 – Configuring Apache Cassandra#

The configuration files are located in /etc/cassandra and /var/lib/cassandra directory holds the Apache Cassandra data files. You can configure the Java start-up options in the /etc/default/cassandra file.

If the database is running on the same host then you don’t need to change anything in the configuration. By default, Cassandra is configured to listen on localhost only.

To make connection with Cassandra using CQL you can use the default command-line tool cqlsh which is shipped with the Cassandra package.

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

Conclusion#

You have learned how to install Apache Cassandra on Debian 10. To learn more about Cassandra, visit the official Apache Cassandra Documentation page.

If you have a problem or suggestion, please leave a comment below.

Related

Tags: cassandra, database, debian, java

How to Install Slack on Ubuntu 20.04 System

Prev Post

How to Install Apache Cassandra on Ubuntu 20.04

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 1
  • 609
  • 1,055,381

DesignLinux.com © All rights reserved

Go to mobile version