Database Reference
In-Depth Information
Installing Cassandra locally
Installing Cassandra on your local machine for experimental or development purposes is as
easy as downloading and unzipping the tarball (the .tar compressed file). For develop-
ment purposes, Cassandra does not have any extreme requirements. Any modern computer
with 1 GB of RAM and a dual-core processor is good to test the water. All the examples in
this chapter are performed on a laptop with 4 GB of RAM, a dual-core processor, and the
Ubuntu 14.04 operating system. Cassandra is supported on all major platforms; after all, it's
Java. Here are the steps to install Cassandra locally:
1. Install Oracle Java 1.6 (Java 6) or higher. Installing the JVM is sufficient, but you
may need the Java Development Kit ( JDK ) if you are planning to code in Java:
# Check whether you have Java installed in your system
$ java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01,
mixed mode)
If you do not have Java, you may want to follow the installation details for your
machine from the Oracle Java website ( http://www.oracle.com/technetwork/java/
javase/downloads/index.html ).
2. Download Cassandra 2.0.0 or a newer version from the Cassandra website ( ht-
tp://archive.apache.org/dist/cassandra/ or http://cassandra.apache.org/download/ ) .
This topic uses Cassandra 2.1.2, which was the latest version at the time of writing
this topic. Decompress this file to a suitable directory:
# Download Cassandra
wget http://archive.apache.org/dist/cassandra/2.1.2/
apache-cassandra-2.1.2-bin.tar.gz
# Untar to your home directory
tar xzf apache-cassandra-2.1.2-bin.tar.gz -C $HOME
The unzipped file location is $HOME/apache-cassandra-2.1.2 . Let's call
this location CASSANDRA_HOME . Wherever we refer to CASSANDRA_HOME in
this topic, always assume it to be the location where Cassandra is installed.
Search WWH ::




Custom Search