Installing Apache 2.2 on any Linux-based platform

Install on Linux-based platforms using a binary tarball.

The latest version of Apache Cassandra is 2.2.15.

Use these steps to install Apache Cassandra on all Linux-based platforms using a binary tarball.

You can use this install for Mac OS X and other platforms without package support, or if you do not have or want a root installation.

Prerequisites

  • DataStax recommends using the latest version of either OpenJDK 8 or Oracle Java Platform, Standard Edition 8 (JDK).
  • Python 2.7 if using cqlsh.
  • If you are using an older RHEL-based Linux distribution, such as CentOS-5, you may see the following error: GLIBCXX_3.4.9 not found. You must replace the Snappy compression/decompression library (snappy-java-1.0.5.jar) with the snappy-java-1.0.4.1.jar.

The binary tarball runs as a stand-alone process.

Procedure

In a terminal window:
  1. Check which version of Java is installed by running the following command:
    java -version
    DataStax recommends using the latest version of Java 8 on all nodes.
  2. Download Apache Cassandra:
    • From Download Cassandra.
    • Use curl to download from one of the mirrors. For example:
      curl -OL http://apache.mirrors.tds.net/cassandra/2.2.15/apache-cassandra-2.2.15-bin.tar.gz
    Note: Apache Cassandra only provides the latest patch version. If you need to install an earlier patch version, contact DataStax Support.
  3. Verify the integrity of the downloaded tarball using one of the methods described here.
  4. Extract the tarball to the desired location:
    tar -xzvf apache-cassandra-2.2.15-bin.tar.gz
    Cassandra is ready for configuration.
  5. Optional: To change the location of the default directories (install_location/data), see the following in install_location/conf/cassandra.yaml:
  6. Optional: To change the location of the log files (install_location/logs), set the path to log directory in bin/cassandra:
    cassandra_parms="$cassandra_parms -Dcassandra.logdir=$CASSANDRA_HOME/logs"

What's next