How to Install Apache Cassandra on Ubuntu 18.04 Bionic Beaver

Install Apache Cassandra on Ubuntu 18.04

In this article, we will have explained the necessary steps to install and configure Apache Cassandra on Ubuntu 18.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Apache Cassandra is a highly scalable database management system that used to manage very large amounts of structured data. It can able to perform on multi-node setups. The Cassandra supports relational databases including MySQL, PostgreSQL and Microsoft SQL and Cassandra is used by a number of organizations including Apple, NetFlix, eBay, and Easou.

Install Apache Cassandra on Ubuntu

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install Java.

Install the Java package by typing:

Verify the Java installation by running the following command which will print the Java version:

Step 2. Install Apache Cassandra.

Now, add the Apache Cassandra repository:

Import the repository’s GPG using the following command:

Then, we can install Cassandra by running the following command:

You can verify that Cassandra is running by typing:

Step 3. Configuring Apache Cassandra.

Apache Cassandra data is stored in the /var/lib/cassandra directory, configuration files are located in /etc/cassandra and Java start-up options can be configured in the /etc/default/cassandra file.

To interact with Cassandra through CQL (the Cassandra Query Language) you can use a command line utility named cqlsh that is shipped with the Cassandra package:

Congratulation, you have learned how to install and use Apache Cassandra on Ubuntu 18.04. If you have any question, please leave a comment below.