Installing Cassandra

Final releases

Official source and binary releases, with signatures, are under "Download" on The current stable release is 0.3.0.

Betas and Release candidates

0.4.0 rc2 is available here (not a direct download link; open in browser). This is a release candidate and may still undergo some changes before the final 0.4.0 release.

If you are new to Cassandra we recommend starting with the 0.4 release candidate -- it fixes some important bugs, and while it may have its own regressions, 0.4's disk format is incompatible with 0.3 so you will save yourself some pain by starting with an 0.4.0 release candidate now and upgrading to the final release soon.

Nightly builds

  1. Download the tarball from here.

  2. tar -zxvf apache-cassandra-incubating-$VERSION-bin.tar.gz

Development trunk

  1. Install jdk6 and Ant
  2. svn checkout cassandra-trunk

  3. ant (optional: ant test)

Note: JDK 1.6 is required. If you get an error like "class file has wrong version 50.0, should be 49.0" then ant is using 1.5 instead. This seems to be a particular pain point for people on OS X. If you've kept up with Apple's updates, Java 6 should already be installed (it comes in Mac OS X 10.5 Update 1). Unfortunately, Apple does not default to using it. What you have to do is change your JAVA_HOME environment setting to /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home and add /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin to the beginning of your PATH.

Please do not run trunk unless you intend to pay attention to the development process.* The reason it's not part of a stable release yet is it's not stable.

*By following the -dev and -commits mailing lists, or svn log at the least.

Start Cassandra on a single node

  1. edit conf/storage-conf.xml to your satisfaction. By default it will run on localhost and use /var/lib/cassandra for data and logs (so create that directory and chown it appropriately if you want to keep things there). If you use a different log and data directory you'll probably also want to edit the log4j log location in conf/

  2. bin/cassandra to start (-f to start in foreground.)

  3. verify that things are working using the CassandraCli command-line client

Running on multiple nodes

  1. Edit conf/storage-conf.xml:

    1. add at least one of your node's public name or IP to the seed section.
    2. set ListenAddress to something all the nodes can resolve. Setting it to empty will always do the Right Thing *if* the node is properly configured (hostname, name resolution, etc), and the Right Thing is to use the address associated with the hostname. Otherwise, set a public IP address here.

  2. use bin/nodeprobe -host X ring where X is each machine in your cluster to make sure all the nodes see each other

Unofficial Debian Package

To install on Debian or Debian derivatives, use the following sources:

deb cassandra/
deb-src cassandra/

Some things to be aware of:

Next steps:

  1. DataModel explains the Cassandra ColumnFamily data model

  2. You may want to edit conf/ by default, even in background mode it will log some things to stdout as it starts up. you can take out the stdout appender if this bugs you, and/or turn the default level from DEBUG down to INFO.

  3. ThriftInterface gives examples for accessing and modifying data. If you are writing a Java client, Cassandra comes with libthrift.jar and the Thrift client classes you will need. Otherwise you will need to InstallThrift and generate the client code for your language of choice. (Thrift supports many languages, including C++, C#, Erlang, Haskell, Java, Objective C, OCaml, Perl, PHP, Python, Ruby, and Squeak.)

  4. RunningCassandra explains how to start Cassandra with non-standard options

  5. ClientExamples gives client examples


GettingStartedOld (last edited 2013-11-14 18:40:48 by GehrigKunz)