Apache Cassandra 1.0 Documentation

Installing the DataStax Community Binaries on Linux or Mac OSX as Root

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

The quickest way to get going on a single node with Cassandra is to install the DataStax Community Edition binary tarball packages using root permissions (or sudo). This installation also creates files and directories in /var/lib/cassandra and /var/log/cassandra. If you need to install everything in a single location, such as your home directory, and without root permissions, see Installing the DataStax Community Binaries as User.

Note

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

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 website.

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

    java -version
    

    Note

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

  2. Download the Cassandra package (required), and the optional OpsCenter:

    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:

    $ tar -xzvf dsc-cassandra-1.0.9-bin.tar.gz
    $ tar -xzvf opscenter.tar.gz
    $ rm *.tar.gz
    
  4. Start the Cassandra server in the background from the directory where the package was installed. For example, if dsc-cassandra-1.0.9 is installed in your home directory:

    $ cd ~/dsc-cassandra-1.0.9
    $ sudo bin/cassandra
    

    Note

    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
    

    ../../_images/get_start_nodetoolring.png

Next Steps