Installing DataStax Community 2.1 on Debian-based systems 

Install using APT repositories on Debian and Ubuntu.

DataStax no longer provides the DataStax Community version of Apache Cassandra™ or the DataStax Distribution of Apache Cassandra. See DataStax support for Apache Cassandra.
To download and install the latest version of open-source Cassandra, see https://cassandra.apache.org/.

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

For a complete list of supported platforms, see Apache Cassandra.

Prerequisites

  • Advanced Package Tool is installed.
  • Root or sudo access to the install machine.
  • Python 2.7.
  • Latest version of Oracle Java Platform, Standard Edition 8 (JDK) is recommended) or OpenJDK 7.

The packaged releases create a cassandra user. When starting Cassandra as a service, the service runs as this user. The following utilities are included in a separate package: sstable2json, sstablelevelreset, sstablemetadata, json2sstable, sstablerepairedset, sstablesplit, and token-generator.

Procedure

In a terminal window:

  1. Check which version of Java is installed by running the following command:
    $ java -version
    It is recommended to use the latest version of Oracle Java 8 on all nodes. (Oracle Java 7 is also supported.)

    See Installing the JDK on RHEL-based systems.

  2. Add the DataStax Community repository to the /etc/apt/sources.list.d/cassandra.sources.list
    $ echo "deb http://debian.datastax.com/community stable main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
  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 https://debian.datastax.com/debian/repo_key | sudo apt-key add -
  5. Install the packages: (For the latest version, check Download DataStax Community Edition.)
    $ sudo apt-get update
    $ sudo apt-get install dsc21=2.1.x-1 cassandra=2.1.x 
    $ sudo apt-get install cassandra-tools=2.1.x ## Optional utilities

    For example, to install DataStax Community 2.1.5:

    $ sudo apt-get update
    $ sudo apt-get install dsc21=2.1.5-1 cassandra=2.1.5 
    $ sudo apt-get install cassandra-tools=2.1.5 ## Optional utilities
    This installs the DataStax Community distribution of Cassandra.
  6. Because the Debian packages start the Cassandra service automatically, you must stop the server and clear the data:

    Doing this removes the default cluster_name (Test Cluster) from the system table. All nodes must use the same cluster name.

    $ 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