Cassandra is a useful NoSQL database management system with praise for its high availability. Let’s demonstrate how to install Cassandra 2.1 on Mac OS X.

Step 1) Install the Oracle Java Development Kit (JDK)

On Macs, you can easily download the corresponding dmg file and install.

After installing, check that you have installed the JDK.

 

Step 2) Install Cassandra

Make a directory for your Cassandra package and change directory into it.

Download the latest Cassandra tar file into the directory you just made.

http://cassandra.apache.org/download/

At the time of writing, 2.1.6 is the most stable release.

Extract the file.

Set a symbolic link from the newly extracted folder to a conveniently named cassandra folder in your packages directory.

 

Step 3) Cassandra directory configurations

We’ll use some convenient Cassandra configurations to store logs, data, and cached files.

We will edit the ~/opt/cassandra/conf/cassandra.yaml file to accommodate the folders that we just created. Configure the following settings. Erase the # on each.

 

4) Add Cassandra to PATH

Open the bash profile.

Add Cassandra to PATH, so you can call cassandra from anywhere.

Load the bash profile.

 

5) Run Cassandra

Start Cassandra. Cassandra should run with a long log record.

CTRL-C to close Cassandra, but let’s not do that right now. Instead, open a new terminal. You can log into the Cassandra shell in the new terminal as long as Cassandra is running.

You can run commands within the Cassandra shell, which looks like:

Cassandra is successfully installed and usable!