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

Pre-requisiteHow to Install Cassandra v3.11.1 on CentOS 6.x

Check Java version if it is already installed:

[root@Sks-cluster-linux ~]# java -version

java version “1.8.0_151”

Java(TM) SE Runtime Environment (build 1.8.0_151-b12)

Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)

[root@Sks-cluster-linux ~]#

 Install Java 8

$ sudo yum install java-1.8.0-openjdk

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

[root@Sks-cluster-linux ~]# cat /etc/yum.repos.d/cassandra.repo


name=Apache Cassandra



enabled = 1



[root@Sks-cluster-linux ~]#

Now install Cassandra:

[root@Sks-cluster-linux ~]# sudo yum install Cassandra

Start Cassandra (will not start automatically):

[root@Sks-cluster-linux ~]# service cassandra start

Make Cassandra start automatically after reboot:

[root@Sks-cluster-linux ~]# chkconfig cassandra on

Restart Cassandra
1 service cassandra restart
Shutdown Cassandra
1 service cassandra stop
 Related files:






 Cassandra commands for service  start|stop|status:

service cassandra start

service cassandra stop

service cassandra status

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:

sudo vi /etc/hosts

Add hostname entry to /etc/hosts [myservername]

Set hostname or reboot

sudo hostname [myservername]