To get started with Cassandra quickly, we'll step through a single-node, local installation.
The following are the requirements to run Cassandra locally:
- A flavor of Linux or macOS
- A system with between 4 GB and 16 GB of random access memory (RAM)
- A local installation of the Java Development Kit (JDK) version 8, latest patch
- A local installation of Python 2.7 (for cqlsh)
- Your user must have sudo rights to your local system
While you don't need to have sudo rights to run Apache Cassandra, it is required for some of the operating system configurations.
Apache Cassandra 3.11.2 breaks with JDK 1.8.0_161. Make sure to use either an older or newer version of the JDK.
Head to the Apache download site for the Cassandra project (http://cassandra.apache.org/download/), choose 3.11.2, and select a mirror to download the latest version of Cassandra. When complete, copy the .tar or .gzip file to a location that your user has read and write permissions for. This example will assume that this is going to be the ~/local/ directory:
mkdir ~/local
cd ~/local
cp ~/Downloads/apache-cassandra-3.11.2-bin.tar.gz .
Untar the file to create your cassandra directory:
tar -zxvf apache-cassandra-3.11.2-bin.tar.gz
Some people prefer to rename this directory, like so:
mv apache-cassandra-3.11.2/ cassandra/