How To Install Cassandra 2 on Fedora 20
Apache Cassandra is a NoSQL database intended for storing large amounts of data in a decentralized, high availability server cluster. NoSQL refers to a database with a data model other than the tabular relations used in relational databases such as MySQL, PostgreSQL, and Microsoft SQL.
- These instructions are intended for installing Cassandra 2 on a single Fedora 20 node.
- I’ll be working from a Liquid Web Self Managed Fedora 20 server, and I’ll be logged in as root.
- You may be able to skip to Step #2 if you already have a stable version of Java 7 (preferably the Oracle/Sun JVM). Check to see if your server already has Java installed by running the following command: java -version
First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before installing anything new.
yum -y update
At this point, installing java is as simple as running just one command:
yum -y install java
For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor
vim /etc/yum.repos.d/datastax.repo
Add the following information to the file you’ve created, using i to insert:
[datastax]
name = DataStax Repo for Apache Cassandra
baseurl = http://rpm.datastax.com/community
enabled = 1
gpgcheck = 0
Then exit and save the file with the command :wq (see the example below):
At this point, installing Cassandra is as simple as running just one command:
yum -y install dsc20
Start-Up Cassandra
systemctl start cassandra
Check Cassandra Service Status
systemctl status cassandra
Enable Cassandra to Start at Boot
systemctl enable cassandra
Check Cassandra Node Status
nodetool status
If you get an error such as: ‘Failed to connect to ’127.0.0.1:7199′: Connection refused’
Then visit the following tutorial: Error: Failed to connect to ’127.0.0.1:7199′: Connection refused (Cassandra) [SOLVED]
Restart Cassandra
systemctl restart cassandra
Shutdown Cassandra
service cassandra stop
Enter the Cassandra Command Line
cqlsh
The cqlsh interface should look similar to:
Connected to Test Cluster at localhost:9160.
[cqlsh 4.1.1 | Cassandra 2.0.10 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
Use HELP for help.
cqlsh>
Related Articles:
- What is CentOS? Everything You Need to Know
- Check Apache Status with systemctl status and apachectl status Commands
- How to Find the Server Name Indication (SNI) Supporting Details
- How to Install Pip on CentOS 7
- Get Kernel Version for Linux: A Guide
- What Is a Time Series Database? How It Works & Use Cases

About the Author: J. Mays
As a previous contributor, JMays shares his insight with our Knowledge Base center. In our Knowledge Base, you'll be able to find how-to articles on Ubuntu, CentOS, Fedora and much more!
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
How to Install WordPress on Linux (AlmaLinux)
Read ArticleWhat is CentOS? Everything You Need to Know
Read ArticleWhat is CentOS? Everything You Need to Know
Read ArticleRedis as Cache: How It Works and Why You Should Use It
Read ArticleRefer-a-Friend Program for Website Hosting: Get $100 for Each Friend!
Read Article