Differences between revisions 26 and 27
Revision 26 as of 2009-09-23 19:35:59
Size: 4685
Editor: EricEvans
Comment: refactored
Revision 27 as of 2013-11-14 18:40:48
Size: 4746
Editor: 107
Comment: statcounter
Deletions are marked like this. Additions are marked like this.
Line 68: Line 68:


Installing Cassandra

Final releases

Official source and binary releases, with signatures, are under "Download" on http://incubator.apache.org/cassandra/. 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 https://svn.apache.org/repos/asf/incubator/cassandra/trunk 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/log4j.properties.

  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 http://www.apache.org/dist/incubator/cassandra/debian cassandra/
deb-src http://www.apache.org/dist/incubator/cassandra/debian cassandra/

Some things to be aware of:

  • Logs are kept in /var/log/cassandra

  • The configuration files are located in /etc/cassandra

  • Start-up options (heap size, etc) can be configured in /etc/default/cassandra

Next steps:

  1. DataModel explains the Cassandra ColumnFamily data model

  2. You may want to edit conf/log4j.properties. 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 107)