how to install apache cassandra on ubuntu 20.04


First, we must connect via ssh.

Add the Cassandra Repository File

echo "deb 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list

Add the GPG Key

To avoid problems with the repository, add the GPG key and increase the security of the repository.

Then we can add the key with the following command:

curl | sudo apt-key add -

Install Cassandra on Ubuntu

sudo apt update
sudo apt install cassandra

Verify Apache Cassandra Installation
Finally, to make sure the Cassandra installation process completed properly, check cluster status:

nodetool status

how to install apache cassandra on ubuntu 20.04
The UN letters in the output signal that the cluster is working.
You can also check Cassandra status by entering:
sudo systemctl status cassandra

The output should display active (running) in green.

how to install apache cassandra on ubuntu 20.04

Optional: Start Apache Cassandra Service Automatically on Boot

When you turn off or reboot your system, the Cassandra service switches to inactive.

To start Cassandra automatically after booting up, use the following command:

sudo systemctl enable cassandra

Test Cassandra Command-Line Shell

The Cassandra software package comes with its command-line tool (CLI). This tool uses Cassandra Query Language (CQL) for communication.

To start a new shell, open the terminal and type:

how to install apache cassandra on ubuntu 20.04


By following these simple steps, you should have a working Cassandra installation on your Ubuntu system.

Additionally, we showed you how to edit the most important parameters in the Cassandra configuration file. Remember to make a backup of the conf file, just in case, and you can start using the Cassandra database software.

Similar Posts:


How useful was this post?

Click on a star to rate it!

Average rating 3 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Leave a Comment

Your email address will not be published.

Scroll to Top