Binary tarball distributions of Cassandra are available from the DataStax Downloads Site. DataStax also provides a GUI Windows installation package for Microsoft Windows and a tar package for Mac. For more information on installing on Windows, see the Installing the DataStax Community Binaries on Windows.
Instructions for installing Cassandra on Linux
To run Cassandra, you will need to install a Java Virtual Machine (JVM). DataStax recommends installing the most recently released version of the Oracle JVM. Versions earlier than 1.6.0_19 are specifically not recommended. See Installing the JRE on Debian or Ubuntu Systems and Installing the JRE on RHEL or CentOS Systems for instructions.
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.
Download the Cassandra DataStax Community package:
$ curl -OL http://downloads.datastax.com/community/dsc.tar.gz
Unpack the distribution:
$ tar -xvzf dsc.tar.gz
$ rm *.tar.gz
By default, Cassandra uses /var/lib/cassandra and /var/log/cassandra.
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
(Optional) Install JNA:
Installing JNA (Java Native Access) on Linux platforms can improve Cassandra memory usage. With JNA installed and configured, Linux does not swap out the JVM, and thus avoids related performance issues.
Download jna.jar from the GitHub.
Add jna.jar to <install_location>/lib/ (or place it in the CLASSPATH).
Add the following lines in the /etc/security/limits.conf file for the user/group that runs Cassandra:
$USER soft memlock unlimited
$USER hard memlock unlimited
Note
JNA is not required on Windows.
The following directories are installed in the installation home directory.
For next steps see Configuring and Starting a Cassandra Cluster.