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.
- 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 Platform, Standard Edition 8
(JDK) is recommended or OpenJDK 7. Note: The JDK is recommended for development and production systems. It provides tools that are not in the JRE, such as jstack, jmap, jps, and jstat, that are useful for troubleshooting.
- Java Native Access (JNA) is required for production installations (latest version recommended). Installing the JNA on Debian or Ubuntu Systems.
In a terminal window:
Check which version of Java is installed by running the following
$ java -versionNote: It is recommended to use the latest version of Oracle Java 8 on all nodes. (Oracle Java 7 is also supported.)
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. For example:
$ sudo apt-get update $ sudo apt-get install dsc20=2.0.11-1 cassandra=2.0.11
Check Download DataStax Community Edition on Planet Cassandra for the latest version.This installs the DataStax Community distribution of Cassandra. .
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.