How to install Cassandra on Debian 11
This section provides a procedural guide to install Cassandra on your Debian 11; let’ start this guide by defining some prerequisites:
Prerequisites
The following list contains the initial mandatory steps to be carried out before installation:
- Latest version of Java
- Access to Apache Cassandra repository
The first few steps refer to getting the above-mentioned prerequisites:
Step 1: Install latest Java on Debian 11
Apache Cassandra requires latest version of Java to be present on your Debian 11; so, if you do not have it; use the following command to get latest Java:
To verify the successful installation of Java, you can check the version of installed Java by issuing the command mentioned below:
Step 2: Add Cassandra repository
To add the Apache Cassandra repository; you must have the GPG key to add the repository to Debian 11; execute the following command in terminal to download GPG key for secure connection:
Once the GPG key is added; you are ready to add the Cassandra repository by issuing the below mentioned command:
Step 3: Install Apache Cassandra
After completing the prerequisites, you can now finally proceed to installation of Cassandra on Debian 11. But before this update the packages list of Debian 11 by using the command written below:
After updating, install the Apache Cassandra by issuing the following command:
Step 4: Verify the installation and connect to Cassandra
You can check the status of Cassandra service to verify its installation; for this, use the tbe mentioned command:
After that, you can also check the status of Cassandra clusters by issuing the command mentioned below:
The “UN” mark in the output shows that the cluster is “UP” and running “Normal”
Conclusion
Debian being a well-known distro of an open-source Operating System Linux provides extensive support to access several databases. Databases are the key component in store and manipulate data by using any query language. SQL and NoSQL databases are used to store data in tabular restrict form and in document form respectively. Apache Cassandra refers to a NoSQL type of database that uses key value pairs to store data and CQL is used by Cassandra to manipulate data. The Cassandra service can store and handle huge amounts of data on several servers. In this post, we have provided a demonstration to install Apache Cassandra on Debian 11 alongside its connection as well. Moreover, for novice users, this guide also provides an insight into the basics of Cassandra as well.