Installing DataStax Community on Debian-based systems

Install using APT repositories on Debian and Ubuntu.

Use these steps to install Cassandra using APT repositories on Debian and Ubuntu Linux.

For a complete list of supported platforms, see DataStax Community – Supported Platforms. 


Note: If you are using Ubuntu 10.04 LTS, you must update to JNA 3.4, as described in Installing the JNA using the binary tarball.

The packaged releases create a cassandra user. When starting Cassandra as a service, the service runs as this user. 


In a terminal window:

  1. Check which version of Java is installed by running the following command:
    java -version
    Use the latest version of Java 6 or 7 on all nodes.
  2. Add the DataStax Community repository to the /etc/apt/sources.list.d/cassandra.sources.list
    deb stable main
  3. Debian systems only:
    1. 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. For example:
      deb http://some.debian.mirror/debian/ $distro main contrib non-free
      This allows installation of the Oracle JVM instead of the OpenJDK JVM.
    2. Save and close the file when you are done adding/editing your sources.
  4. Add the DataStax repository key to your aptitude trusted keys.
    $ curl -L | sudo apt-key add -
  5. Install the latest package. For example:
    $ sudo apt-get update
    $ sudo apt-get install dsc12=1.2.10-1 cassandra=1.2.10
    Note: To install prior versions of 1.2, use this format: $ sudo apt-get install dsc12=1.2.x-1 cassandra=1.2.x.
    This installs the DataStax Community distribution of Cassandra. By default, the Debian packages start the Cassandra service automatically.
  6. 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/*


The DataStax Community distribution of Cassandra is ready for configuration.

What's next