Apache Cassandra 1.0 Documentation

Installing the Cassandra Binary Tarball Distribution

This document corresponds to an earlier product version. Make sure you are using the version that corresponds to your version.

Latest Cassandra documentation | Earlier Cassandra documentation

DataStax provides binary tarball distributions of Cassandra for installing on platforms that do not have package support, such as Mac, or if you do not have or want to do a root installation. For a complete list of supported platforms, see DataStax Community – Supported Platforms.

Note

By downloading community software from DataStax you agree to the terms of the DataStax Community EULA (End User License Agreement) posted on the DataStax web site.

Prerequisites

Before installing Cassandra make sure the following prerequisites are met:

  • Oracle Java SE Runtime Environment (JRE) 6. Java 7 is not recommended.

  • Java Native Access (JNA) is required for production installations. See Installing JNA.

    Note

    If you are using Ubuntu 10.04 LTS, you need to update to JNA 3.4, as described in Install JNA on Ubuntu 10.04.

Steps to Install Cassandra

  1. Check which version of Java is installed by running the following command in a terminal window:

    java -version
    

    DataStax recommends using the most recently released version of Oracle Java SE Runtime Environment (JRE) 6 on all DSE nodes. Versions earlier than 1.6.0_19 should not be used. Java 7 is not recommended. If you need help installing Java, see Installing Oracle JRE.

  2. Download the Cassandra DataStax Community tarball:

    $ curl -OL http://downloads.datastax.com/community/dsc-cassandra-1.0.9-bin.tar.gz
    
  3. Unpack the distribution:

    $ tar -xvzf dsc-cassandra-1.0.9-bin.tar.gz
    $ rm *.tar.gz
    
  4. By default, Cassandra installs files into the /var/lib/cassandra and /var/log/cassandra directories.

    If you do not have root access to the default directories, ensure you have write access as follows:

    $ sudo mkdir /var/lib/cassandra
    $ sudo mkdir /var/log/cassandra
    $ sudo chown -R $USER:$GROUP /var/lib/cassandra
    $ sudo chown -R $USER:$GROUP /var/log/cassandra