In this tutorial we will show you how to install and configuration of Cassandra on your CentOS 7 server. For those of you who didn’t know, Apache Cassandra is a NoSQL database intended for storing large amounts of data in a decentralized, highly available 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. The Apache Cassandra database is the right choice when you need scalability and high availability without compromising performance.
This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Apache Cassandra on a CentOS 7 server.
Install Cassandra on CentOS 7
Step 1. First let’s start by ensuring your system is up-to-date.
Step 2. Installing Java for Cassandra.
Cassandra is written in Java. As such, you’ll need the Java VM installed in order to run it. Do so via Yum:
Verify Installed Java version:
# java -version
Step 3. Create yum repo file for Cassandra.
Create a yum repo file which will get the packages from Datastax yum repository server:
Paste below given content in repo file:
Save and exit
Step 4. Installing Cassandra.
At this point, installing Cassandra is as simple as running just one command:
Get Cassandra Running:
Let’s ensure that Cassandra is running using this command:
Cassandra ships with a powerful command line utility, cqlsh. Launch it to perform various vital tasks with your database:
Congratulation’s! You have successfully installed Apache Cassandra. Thanks for using this tutorial for installing Cassandra on your CentOS 7 system. For additional help or useful information, we recommend you to check the official Apache Cassandra web site.