In this blog, we will explain how to Install Cassandra v3.11.1 on CentOS 6.x. Apache Cassandra isHow to Install Cassandra v3.11.1 on CentOS 6.x a NoSQL database intended for storing large amounts of data in a decentralized, highly available cluster.

Pre-requisite to install Cassandra on CentOS or Linux

Check Java version if it is already installed:

Install Java 8 on Linux

Create cassandra.repo file, so that you can install from yum command:

Install Cassandra on Linux:

A command to start Cassandra service on Linux:

Make Cassandra to start automatically after reboot:

Command to restart Cassandra service on Linux

Command to shutdown Cassandra service on Linux

Cassandra related files:

 Cassandra commands for service  start|stop|status:

Cassandra known Issue:

ERROR: [root@sks-cluster-linux~]# service cassandra status

cassandra dead but pid file exists


ERROR: – Local host name unknown:

Solutions 1:

//This error may be because of heap-memory of system – check your system memory (free -m/2 after divide it should be greate than 2GB)

//So upgrade your box to min 6GB

Solution 2:

In AWS EC2, when you install Cassandra you can have this problem because of the initially configured hostname which is set to ip-x-x-x-x being x-x-x-x the EC2 instance private address. The steps to solve it:

Edit network configuration file /etc/sysconfig/network

Edit hosts file:

Add hostname entry to /etc/hosts

Set hostname or reboot