Binary tarball distributions of Cassandra are available from the Apache Cassandra project website.
To run Cassandra, you will need to install a Java Virtual Machine (JVM). DataStax recommends installing the most recently released version of the Sun JVM. Versions earlier than 1.6.0_19 are specifically not recommended. See Installing Sun JRE on Ubuntu Systems and Installing Sun JRE on RedHat Systems for instructions.
Download the distribution to a location on your machine and unpack it. For example:
$ wget http://apache.mirrors.pair.com//cassandra/0.8.5/apache-cassandra-0.8.5-src.tar.gz $ gunzip apache-cassandra-0.8.5-src.tar.gz $ tar -xvf apache-cassandra-0.8.5-src.tar
For convenience, set the following environment variables in your user environment (such as .bashrc):
export CASSANDRA_HOME=<install_location>/apache-cassandra-0.8.5 export PATH=$PATH:$CASSANDRA_HOME/bin
Create the data and logging directories needed by Cassandra. By default, Cassandra uses /var/lib/cassandra and /var/log/cassandra. To create these directories, run the following commands where $USER is the user that will run Cassandra:
# mkdir /var/lib/cassandra # mkdir /var/log/cassandra # chown -R $USER:$GROUP /var/lib/cassandra # chown -R $USER:$GROUP /var/log/cassandra
The following directories are installed in $CASSANDRA_HOME
Installing JNA (Java Native Access) on Linux platforms can improve Cassandra memory usage. With JNA installed and configured as described in this section, Linux does not swap out the JVM, and thus avoids related performance issues.
$USER soft memlock unlimited $USER hard memlock unlimited