Apache Cassandra 1.1 Documentation

Installing Cassandra Debian Packages

This document corresponds to an earlier product version. Make sure you are using the version that corresponds to your version.

Latest Cassandra documentation | Earlier Cassandra documentation

DataStax provides Debian package repositories for Debian and Ubuntu. 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.

Prerequisites

Before installing Cassandra make sure the following prerequisites are met:

Steps to Install Cassandra

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

  1. 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.

  2. Add the DataStax Community repository to the /etc/apt/sources.list.d/cassandra.sources.list.

    deb http://debian.datastax.com/community stable main
    
  3. (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.

  4. Add the DataStax repository key to your aptitude trusted keys.

    $ curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add -
    
  5. 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.

  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/*