Installing Apache 3.x on any Linux-based platform

Install on Linux-based platforms using a binary tarball.

The latest version of Cassandra 3.x is 3.11.5.

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. See Installing the JDK and Python 2.7.
  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/3.11.5/apache-cassandra-3.11.5-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-3.11.5-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:
    if [ -z "$CASSANDRA_LOG_DIR" ]; then
      CASSANDRA_LOG_DIR=/var/log/cassandra
    fi

What's next