Apache Cassandra 1.0 Documentation

Installing the DataStax Community Binaries as User

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

This section provides instructions for installing and setting up a self-contained, single-node cluster of Cassandra in your home directory that does not require root permissions using the binary tarball packages. The root permissions install creates files in the var/lib/cassandra directory.


These instructions tell you how to install an older version of Cassandra. DataStax recommends installing the latest version of Cassandra. See the Download page.

Steps to Install Cassandra


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.

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

    java -version


    Any version of Java is fine for installing an evaluation instance. For production deployments, see Installing Oracle JRE.

  2. From your home directory, download the Cassandra package (required), and the OpsCenter package(optional):

    For example, on Linux to get the latest versions of DataStax and OpsCenter Community Editions and the Portfolio Demo:

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

    $ dsc-cassandra-1.0.9-bin.tar.gz
    $ tar -xzvf opscenter.tar.gz
    $ rm *.tar.gz
  4. Rename the downloaded directory to datastax:

    $ mv dsc-cassandra-1.0.9 datastax
  5. In the datastax directory, create the data and logging directory for Cassandra.

    $ cd datastax
    $ mkdir cassandra-data
  6. In cassandra-data, create the following directories: saved_caches and commitlog.

    $ cd cassandra-data
    $ mkdir data
    $ mkdir saved_caches
    $ mkdir commitlog

Steps to Configure and Start the Cluster

After installing a single-node Cassandra cluster in your home directory, you must set some configuration properties to use the new directory locations. These properties are specified in the cassandra.yaml and log4j-server.properties files.

  1. Go the directory containing the cassandra.yaml file:

    $ cd ~/datastax/conf
  2. Edit the following lines in cassandra.yaml:

    initial_token: 0
    data_file_directories: - ~/datastax/cassandra-data/data
    commitlog_directory: ~/datastax/cassandra-data/commitlog
    saved_caches_directory: ~/datastax/cassandra-data/saved_caches
  3. In the conf directory, edit the following line in the log4j-server.properties file:

    log4j.appender.R.File= ~/datastax/cassandra-data/system.log
  4. Start the Cassandra server in the background.

    $ cd ~/datastax
    $ bin/cassandra


    When Cassandra loads, you may notice a message that MX4J will not load and that mx4j-tools.jar is not in the classpath. You can ignore this message. MX4j provides an HTML and HTTP interface to JMX and is not necessary to run Cassandra. DataStax recommends using OpsCenter. It has more monitoring capabilities than MX4J.

  5. Check that Cassandra is running by invoking the nodetool utility from the installation home directory:

    $ bin/nodetool ring -h localhost


Next Steps

  • Install the DataStax OpsCenter. The OpsCenter is a browser-based application for managing and monitoring a Cassandra cluster. See the Installing the OpsCenter.
  • Run the Portfolio Demo example application.