2

How to Install Apache Cassandra on Debian 11

 2 years ago
source link: https://www.vultr.com/docs/how-to-install-apache-cassandra-on-debian-11
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
<?xml encoding="utf-8" ??>

Introduction

Apache Cassandra is an open-source NoSQL distributed database engine. NoSQL database engines store data as key-value pairs, and Apache Cassandra comes with Cassandra Query Language (CQL) for retrieving the data. It can handle large amounts of data while ensuring availability and consistency. It supports single-node replication and multi-location replication for redundancy, no single point of failure, and disaster recovery. It runs several nodes within a cluster, where each single node can receive and process a complete request without communication to the master node.

This article explains how to install Apache Cassandra on Debian 11.0 server.

Prerequisites

Perform the following steps first:

1. Install Java

For Apache Casandra to run, you need Java installed in your server. Install Java.

$ sudo apt install openjdk-11-jdk -y

Check the Java version installed.

$ java -version

2. Configure Apache Cassandra Repository

Install the required dependencies.

$ sudo apt install apt-transport-https gnupg2 -y

Download and add the Apache Cassandra GPG key.

$ sudo wget -q -O - https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -

Add the downloaded repository.

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

3. Install Apache Cassandra

Update the system.

$ sudo apt update

Install Apache Cassandra.

$ sudo apt install cassandra -y

Enable Apache Cassandra to start on system boot.

$ sudo systemctl enable cassandra

Check the status of the Apache Cassandra service.

$ sudo systemctl status cassandra

Check the status of your cluster. You might need to wait for a couple of seconds for all nodes in the cluster to finish starting up.

$ sudo nodetool status

4. Configure Apache Cassandra

Log in with the cqlsh command-line tool to interact with Cassandra cluster.

$ cqlsh

When finished, exit the prompt.

EXIT;

Conclusion

You have installed Apache Cassandra on Debian 11.0 server. You can check the official documentation to learn more about using and managing the database server.

Want to contribute?

You could earn up to $600 by adding new articles


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK