Installing DataStax Community on Debian-based systems
Install using APT repositories on Debian and Ubuntu.
- Advanced Package Tool is installed.
- Root or sudo access to the install machine.
- Python 2.6+ (needed if installing OpsCenter).
- Latest version of Oracle Java SE Runtime Environment (JRE) 7. See Installing Oracle JRE on Debian or Ubuntu Systems.
- Java Native Access (JNA) is required for production installations. Installing the JNA on Debian or Ubuntu Systems.
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:
Check which version of Java is installed by running the following
$ java -versionUse the latest version of Oracle Java 7 on all nodes.
Add the DataStax Community repository to the
$ echo "deb http://debian.datastax.com/community stable main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
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. For example:
deb http://some.debian.mirror/debian/ $distro main contrib non-freeThis allows installation of the Oracle JVM instead of the OpenJDK JVM.
- Save and close the file when you are done adding/editing your sources.
- 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:
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 package.
$ sudo apt-get update $ sudo apt-get install dsc20This installs the DataStax Community distribution of Cassandra. 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/*
The distribution of Cassandra is ready for configuration.