How to Install Apache Cassandra on CentOS

Introduction

Apache Cassandra is a free and open source database management system based on NoSQL. It is designed to handle large amount of data across many commodity servers. It was released by Facebook on Google code in July, 2008. In April 2009, it became an apache incubator project. Its development was started by Avinash Laxman and Prashant Malik for Facebook inbox search feature. In this tutorial, we will install Cassandra on CentOS.

Prerequisites

  • CentOS7
  • Yum must be configured on the system.
  • Login as a root on terminal

Installation

1) Enable Cassandra's Yum repository

Create a file as /etc/yum.repos.d/cassandra.repo and place the following code inside it.

CentOS How to Install Cassandra on CentOS 1

2) Install Cassandra

Run the following command to install Cassandra.

CentOS How to Install Cassandra on CentOS 2
CentOS How to Install Cassandra on CentOS 3
CentOS How to Install Cassandra on CentOS 4

3) Start Cassandra

Use the following command to start the service of Cassandra.

CentOS How to Install Cassandra on CentOS 5

4) Working on Command Line

Basically, Cassandra works on CQL which is a database query language other than SQL. In Cassandra database, we can open the interface on the terminal by executing cqlsh which is an executable script file. Simply type cqlsh on the terminal to open a CQL shell.

CentOS How to Install Cassandra on CentOS 6

We can ask for help on CQL shell to get the help in operating Cassandra Database.

CentOS How to Install Cassandra on CentOS 7

5) Stop Database

Use the following command to stop Cassandra database server.

CentOS How to Install Cassandra on CentOS 8

Hence, we have installed and get started with Apache Cassandra.


Next TopicInstall MySQL




Latest Courses