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.
These instructions tell you how to install an older version of Cassandra. DataStax recommends installing the latest version of Cassandra. See the Download page.
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.
Check that Java is installed by running the following command in a terminal window:
Any version of Java is fine for installing an evaluation instance. For production deployments, see Installing Oracle JRE.
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
Unpack the distributions:
$ tar -xzvf dsc-cassandra-1.0.9-bin.tar.gz $ tar -xzvf opscenter.tar.gz $ rm *.tar.gz
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
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.
Check that Cassandra is running by invoking the nodetool utility from the installation home directory:
bin/nodetool ring –h localhost