DataStax provides Debian package repositories for Debian and Ubuntu. For a complete list of supported platforms, see DataStax Community – Supported Platforms.
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 packaged releases create a cassandra user. When starting Cassandra as a service, the service runs as this user.
Check which version of Java is installed by running the following command in a terminal window:
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.
Add the DataStax Community repository to the /etc/apt/sources.list.d/cassandra.sources.list.
deb http://debian.datastax.com/community stable main
(Debian Systems Only) In /etc/apt/sources.list, find the line that describes your source repository for Debian and add contrib non-free to the end of the line. This allows installation of the Oracle JVM instead of the OpenJDK JVM. For example:
deb http://some.debian.mirror/debian/ $distro main contrib non-free
Save and close the file when you are done adding/editing your sources.
Add the DataStax repository key to your aptitude trusted keys.
$ curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add -
Install the Python CQL driver and the DataStax Community package.
$ sudo apt-get update $ sudo apt-get install python-cql $ sudo apt-get install dsc1.1 cassandra=1.1.9
This installs the Python CQL driver, the DataStax Community distribution of Cassandra, and the OpsCenter Community Edition.
By default, the Debian packages start the Cassandra service automatically.
To stop the service and clear the initial gossip history that gets populated by this initial start:
$ sudo service cassandra stop $ sudo rm -rf /var/lib/cassandra/data/system/*