You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by Apache Wiki <wi...@apache.org> on 2009/05/06 17:38:37 UTC

[Cassandra Wiki] Update of "GettingStarted" by EricEvans

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The following page has been changed by EricEvans:
http://wiki.apache.org/cassandra/GettingStarted

The comment on the change is:
imported from confluence wiki (with minor editorial changes)

New page:
=== Installing Cassandra ===

There is currently no official release of Cassandra. You can either fetch a nightly build or check out the source and build it yourself.

==== Nightly builds ====

 1. Download the tarball from [http://hudson.zones.apache.org/hudson/job/Cassandra/lastSuccessfulBuild/artifact/cassandra/build/ here].
 1. tar -zxvf cassandra-$VERSION-dev.tgz

==== Here is how to get started on the development trunk on a single local node: ====

 1. Install jdk6 and Ant
 1. `svn checkout https://svn.apache.org/repos/asf/incubator/cassandra/trunk cassandra-trunk`

 1. `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.''


=== 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/cassandra` for data and logs (so create that directory and chown it appropriately if you want to keep things there).
 1. `bin/cassandra` to start (`-f` to start in foreground.)
 1. Go to http://localhost:7002 with your web browser.  If cassandra is running you will get a (very rudimentary) admin console page.  (This won't always be 127.0.0.1 or even localhost; Cassandra tries to guess your "real" hostname and listen on that.  Sometimes it does not guess what you'd expect. We have a [https://issues.apache.org/jira/browse/CASSANDRA-43 ticket] to address this.)


=== Running on multiple nodes ===

 1. Edit `conf/storage-conf.xml` and add at least one of your node's public name or IP to the seed section.
 1. Make sure you are using hostnames that all the nodes can resolve.  Each node logs what it is using with a line like "DEBUG - Starting to listen on jbe-ubuntu:7001".  If Cassandra picks the wrong name then the easiest solution is to add that name to `/etc/hosts` for your cluster machines.
 1. Again, you can check http://localhost:7002 on each machine to make sure all the nodes see each other.
 1. The insert/retrieve interface on the web admin is for ''local'' inserts and lookups.  So if you do an insert via thrift and then can't read it via the web, it's probably because it's actually on another node.


=== Next steps: ===

 1. 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.
 1. DataModel explains the Cassandra ColumnFamily data model
 1. 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 a lot of languages, including C++, C#, Erlang, Haskell, Java, Objective C, OCaml, Perl, PHP, Python, Ruby, and Squeak.)