Official Package To Install On Debian(tm) (not a product of Debian(tm))

DataStax hosts debian packages that include Cassandra and various tools for working with Cassandra.

Alternatively, you can install directly from the ASF repositories:

deb http://www.apache.org/dist/cassandra/debian 11x main
deb-src http://www.apache.org/dist/cassandra/debian 11x main

You will want to replace 11x by the series you want to use: `10x for the 1.0.x series, 08x for the 0.8.x series, etc... You will not automatically get major version updates unless you change the series, but that is a feature.

If you run apt-get update now, you will see an error similar to this:

GPG error: http://www.apache.org unstable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F758CE318D77295D

This simply means you need to add the PUBLIC_KEY. You do that like this:

gpg --keyserver pgp.mit.edu --recv-keys F758CE318D77295D
gpg --export --armor F758CE318D77295D | sudo apt-key add -

Starting with the 0.7.5 debian package, you will also need to add public key 2B5C1B00 using the same commands as above:

gpg --keyserver pgp.mit.edu --recv-keys 2B5C1B00
gpg --export --armor 2B5C1B00 | sudo apt-key add -

(The list of Apache contributors public keys is available at http://www.apache.org/dist/cassandra/KEYS).

Then you may install Cassandra by doing:

sudo apt-get update
sudo apt-get install cassandra

Some things to be aware of:

Building Packages on Debian

Once all the build dependencies are set up, all you need to do is run

dpkg-buildpackage -uc -us

Troubleshooting:

Make sure you are building with the Sun JDK, not OpenJDK, and not gcj. You want to see something like this:

# java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

By default, installing the Cassandra Debian package or its build dependencies will pull in OpenJDK. For runtime purposes this will work fine, but due to an issue with the packaging of OpenJDK in Lenny (see http://bugs.debian.org/501487), building the package from source will fail. If you need to (re)build the package on Lenny, install sun-java6-jdk before-hand (sun-java6-jdk provides java6-sdk which satisfies the dependency), or use the alternatives system to change the default compiler afterward.

sudo update-alternatives --config javac

Note: See also CASSANDRA-1575.

stats

DebianPackaging (last edited 2013-11-13 21:14:33 by GehrigKunz)