DataStax provides binary tarball distributions of Cassandra for installing on platforms that do not have package support, such as Mac, or if you do not have or want to do a root installation. For a complete list of supported platforms, see DataStax Community – Supported Platforms.
Note
By downloading community software from DataStax you agree to the terms of the DataStax Community EULA (End User License Agreement) posted on the DataStax web site.
Before installing Cassandra make sure the following prerequisites are met:
The latest version of Oracle Java SE Runtime Environment (JRE) 6 is installed. Java 7 is not recommended.
Java Native Access (JNA) is required for production installations. See Installing JNA.
Also see Recommended settings for production installations.
Note
If you are using Ubuntu 10.04 LTS, you need to update to JNA 3.4, as described in Install JNA on Ubuntu 10.04.
Download the Cassandra DataStax Community tarball:
$ curl -OL http://downloads.datastax.com/community/dsc.tar.gz
Check which version of Java is installed by running the following command in a terminal window:
java -version
Use the latest version of Java 6 on all nodes. Java 7 is not recommended. If you need help installing Java, see Installing the JRE on Debian or Ubuntu Systems.
Unpack the distribution:
$ tar -xvzf dsc.tar.gz
$ rm *.tar.gz
By default, Cassandra installs files into the /var/lib/cassandra and /var/log/cassandra directories.
If you do not have root access to the default directories, ensure you have write access as follows:
$ sudo mkdir /var/lib/cassandra
$ sudo mkdir /var/log/cassandra
$ sudo chown -R $USER:$GROUP /var/lib/cassandra
$ sudo chown -R $USER:$GROUP /var/log/cassandra