|Deletions are marked like this.||Additions are marked like this.|
|Line 68:||Line 68:|
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.
Download the tarball from here.
- tar -zxvf apache-cassandra-incubating-$VERSION-bin.tar.gz
- Install jdk6 and Ant
svn checkout https://svn.apache.org/repos/asf/incubator/cassandra/trunk cassandra-trunk
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
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.
bin/cassandra to start (-f to start in foreground.)
verify that things are working using the CassandraCli command-line client
Running on multiple nodes
- add at least one of your node's public name or IP to the seed section.
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.
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
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.
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.)
RunningCassandra explains how to start Cassandra with non-standard options
ClientExamples gives client examples