How to download and install Apache Cassandra on Ubuntu

This tutorial is about downloading and installing Apache Cassandra on Ubuntu. We will do our best to make sure you understand this guide. I hope you will like this blog How to download and install Apache Cassandra on Ubuntu. If your answer is yes, please share after reading this.

Check out how to download and install Apache Cassandra on Ubuntu

Apache Cassandra is a powerful, open-source NoSQL database engine that provides fault tolerance, linear scalability, and consistency across multiple nodes. Due to its distributed architecture, Apache Cassandra manages large amounts of data using Dynamo-style replication. Here, replicas are stored on multiple nodes in a cluster, ensuring high availability and zero point of failure. Apache Cassandra is ideal for IoT applications that collect large amounts of data. It is also useful for social media analysis, messaging services, and retail applications.

Businesses using Apache Cassandra include Netflix, Facebook, Cisco, Hulu, Twitter, and many more. The Apache Cassandra database is the right choice when you need scalability and high availability without compromising performance. Linear scalability and proven fault tolerance on off-the-shelf hardware or cloud infrastructure make it the ideal platform for business-critical data. Cassandra’s support for replication across multiple datacenters is best-in-class, providing its users with lower latency and the peace of mind that they can survive regional outages.

Apache Cassandra on Linux

The Apache Cassandra NoSQL database engine was built using the Java programming language and is licensed under the Apache 2.0 License for Data Protection. The Apache Cassandra tool git repository contains all versions of Cassandra. The Apache Cassandra NoSQL database works with Java on Linux. It can read, write and repair databases.

On Linux, Apache Cassandra can really help you find bad cluster data from huge amount of data; Additionally, it has been in use for decades due to its distributed storage method and flexibility. In this article, we will see how to install Apache Cassandra on Linux.

Install Apache Cassandra on the Ubuntu / Debian distribution

Since Apache Cassandra is written in Java, obviously Java will need to be installed and configured on the system to install the Cassandra tool on Ubuntu and other Linux systems. Here we will first install the Java packages on our Ubuntu machine, then we will install Apache Cassandra via Java protocol and HTTPS.

Install Java on Ubuntu / Debian

Installing Java on Ubuntu and Debian distributions is simple and straightforward. First, update your system repository and then run the following apt command to install Java on the system.

  • sudo apt update
  • sudo apt install openjdk-8-jdk -y

After the installation is complete, you can run a quick version check to make sure Java is working properly. If you see that other versions of Java are installed on the machine, make sure that Java 1.8 is on the machine.

java -version

Install HTTPS Ubuntu Linux

HTTPS will allow the Apache Cassandra tool to run on the Linux Ubuntu system. You can run the following apt command in the terminal shell to install the HTTPS protocol on the system.

  • sudo apt install apt-transport-https

Then the following commands to add the Cassandra key for network protocols on your Ubuntu system.

  • sudo sh -c ‘echo “deb http://www.apache.org/dist/cassandra/debian 40x main”> /etc/apt/sources.list.d/cassandra.list’
  • wget -q -O – https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add

Install Cassandra on Ubuntu Linux

Finally, you can now run the commands below to update the system repository and install the Apache Cassandra NoSQL database engine on your Linux machine. If you correctly install the Java and HTTPS protocols on your system, the following commands will not take long to complete the installation of Cassandra.

  • sudo apt update
  • sudo apt-get install cassandra

Monitor Cassandra on Ubuntu

Monitoring the Apache Cassandra tool on Ubuntu requires root access to the system. At first, you can run the following node tool command to check Cassandra status, execution details, and cluster status.

The following system control commands will allow you to start and restart the Cassandra service. It will also let you know the status of Cassandra on your system.

  • sudo systemctl status cassandra
  • sudo systemctl start cassandra
  • sudo systemctl restart Cassandra

You can also use the following superuser authorization system control commands to stop and enable Cassandra services on your Linux machine.

  • sudo systemctl stop cassandra
  • sudo systemctl activate Cassandra

To modify and configure the Apache Cassandra configuration file, you may need to make a backup copy of the current configuration script. Later we will use the file to restore default settings if you mess up.

  • sudo cp /etc/cassandra/cassandra.yaml /etc/cassandra/cassandra.yaml.backup

Then you can edit the script with your favorite script editing tool.

  • $ sudo vim /etc/cassandra/cassandra.yaml

Finally, to connect to the Apache Cassandra database, run the following command; will allow you to enter Cassandra’s query language.

Install Cassandra on Fedora Workstation

Installing Apache Cassandra on a Fedora or other Red Hat-based system requires Java services on both the server and the client. You can run the following command to get an overview of Cassandra packages on your system.

Install Cassandra on Fedora

Because the Apache database provides the official Cassandra repository for Linux, you can use the official DNF package installer command to install the Apache Cassandra tool on Fedora Linux.

Run the following DNF command with root access to install Apache Cassandra on your DENF based Linux environments.

  • $ sudo dnf install cassandra cassandra-server

Add a firewall for Cassandra in Fedora

If your DNF-based system has an active firewall system, you can run the following commands to allow your firewall daemon to allow Cassandra applications.

  • sudo firewall-cmd –zone = public –add-port = 9081 / tcp –permanent
  • sudo firewall-cmd –zone = public –add-port = 9042 / tcp –permanent
  • sudo firewall-cmd – reload

If you are a former Cassandra user, you can run the following command in the shell to run system check commands to stop the Cassandra tool.

  • $ sudo systemctl stop cassandra
  • $ sudo rm -rf / var / lib / cassandra / data / system / *

Installing Apache Cassandra on Arch-based Linux

The CLI method to install the Apache Cassandra tool on Arch and other Arch-based systems requires the Snap daemon on the system. If you haven’t installed the Snap daemon on your system, follow this post for instructions on how to install and use Snap on a Linux machine.

When the Snap system is installed on the machine, you can now run the following Snap command to install the latest Apache Cassandra tool on your Arch Linux. Here I have used the Manjaro KDE desktop to demonstrate how to install Apache Cassandra on the Arch system.

  • sudo snap install cassandra –edge

Getting started with Apache Cassandra

Once the installation is complete, run the system check command below to start and restart the Cassandra tool on the system.

  • $ sudo systemctl start cassandra
  • $ sudo systemctl restart Cassandra

The following Cassandra query language will help you create a new superuser on your system for Cassandra.

  • cqlsh> CREATE PAPER WITH PASSWORD = “
  • AND SUPERUSER = true
  • AND LOGIN = true;

Final words: How to download and install Apache Cassandra on Ubuntu

hope you will understand this item How to download and install Apache Cassandra on Ubuntu, if your answer is no, you can request anything through the contact forum section linked to this article. And if your answer is yes, then share this article with your family and friends.

Comments are closed.