These are the instructions for deploying the supported releases of Apache Cassandra on Linux servers.
Downloading Cassandra Latest Beta Version. Download the latest Apache Cassandra 4.0 beta release: 4.0-beta2 (pgp, sha256 and sha512), released on 2020-08-31. Latest Stable Version. Download the latest Apache Cassandra 3.11 release: 3.11.8 (pgp, sha256 and sha512), released on 2020-08-31. Older Supported Releases. Cassandra Installation on Mac. The following document describes setting up Cassandra as a service. If you are interested in running Cassandra in userspace, check out the instructions in MacOS Developer Setup for React, React Native, Node and Cassandra Development.
Cassandra runs on a wide array of Linux distributions including (but not limited to):
- Ubuntu, most notably LTS releases 16.04 to 18.04
- CentOS & RedHat Enterprise Linux (RHEL) including 6.6 to 7.7
- Amazon Linux AMIs including 2016.09 through to Linux 2
- Debian versions 8 & 9
- SUSE Enterprise Linux 12
This is not an exhaustive list of operating system platforms, nor is it prescriptive. However users will bewell-advised to conduct exhaustive tests of their own particularly for less-popular distributions of Linux.Deploying on older versions is not recommended unless you have previous experience with the older distributionin a production environment.
Prerequisites¶
- Install the latest version of Java 8, either the Oracle Java Standard Edition 8 or OpenJDK 8. Toverify that you have the correct version of java installed, type
java-version
. - NOTE: Experimental support for Java 11 was added in Cassandra 4.0 (CASSANDRA-9608).Running Cassandra on Java 11 is experimental. Do so at your own risk. For more information, seeNEWS.txt.
- For using cqlsh, the latest version of Python 2.7 or Python 3.6+. To verify that you havethe correct version of Python installed, type
python--version
.
Choosing an installation method¶
For most users, installing the binary tarball is the simplest choice. The tarball unpacks all its contentsinto a single location with binaries and configuration files located in their own subdirectories. The mostobvious attribute of the tarball installation is it does not require root
permissions and can beinstalled on any Linux distribution.
Packaged installations require root
permissions. Install the RPM build on CentOS and RHEL-baseddistributions if you want to install Cassandra using YUM. Install the Debian build on Ubuntu and otherDebian-based distributions if you want to install Cassandra using APT. Note that both the YUM and APTmethods required root
permissions and will install the binaries and configuration files as thecassandra
OS user.
Installing the binary tarball¶
- Verify the version of Java installed. For example:
- Download the binary tarball from one of the mirrors on the Apache Cassandra Downloadsite. For example, to download 4.0:
NOTE: The mirrors only host the latest versions of each major supported release. To download an earlierversion of Cassandra, visit the Apache Archives.
- OPTIONAL: Verify the integrity of the downloaded tarball using one of the methods here.For example, to verify the hash of the downloaded file using GPG:
Compare the signature with the SHA256 file from the Downloads site:
- Unpack the tarball:
Download Cassandra On Mac Mojave
The files will be extracted to the apache-cassandra-4.0-beta1/
directory. This is the tarball installationlocation.
- Located in the tarball installation location are the directories for the scripts, binaries, utilities, configuration, data and log files:
For information on how to configure your installation, seeConfiguring Cassandra.
- Start Cassandra:
NOTE: This will run Cassandra as the authenticated Linux user.
You can monitor the progress of the startup with:
Cassandra is ready when you see an entry like this in the system.log
:
- Check the status of Cassandra:
The status column in the output should report UN which stands for “Up/Normal”.
Alternatively, connect to the database with:
Installing the Debian packages¶
- Verify the version of Java installed. For example:
- Add the Apache repository of Cassandra to the file
cassandra.sources.list
. The latest major versionis 4.0 and the corresponding distribution name is40x
(with an “x” as the suffix).For older releases use311x
for C* 3.11 series,30x
for 3.0,22x
for 2.2 and21x
for 2.1.For example, to add the repository for version 4.0 (40x
):
- Add the Apache Cassandra repository keys to the list of trusted keys on the server:
- Update the package index from sources:
- Install Cassandra with APT:
NOTE: A new Linux user cassandra
will get created as part of the installation. The Cassandra servicewill also be run as this user.
- The Cassandra service gets started automatically after installation. Monitor the progress ofthe startup with:
Cassandra is ready when you see an entry like this in the system.log
:
NOTE: For information on how to configure your installation, seeConfiguring Cassandra.
- Check the status of Cassandra:
The status column in the output should report UN
which stands for “Up/Normal”.
Alternatively, connect to the database with:
Installing the RPM packages¶
- Verify the version of Java installed. For example:
- Add the Apache repository of Cassandra to the file
/etc/yum.repos.d/cassandra.repo
(as theroot
user). The latest major version is 4.0 and the corresponding distribution name is40x
(with an “x” as the suffix).For older releases use311x
for C* 3.11 series,30x
for 3.0,22x
for 2.2 and21x
for 2.1.For example, to add the repository for version 4.0 (40x
):
- Update the package index from sources:
- Install Cassandra with YUM:
Download Cassandra On Mac Os
NOTE: A new Linux user cassandra
will get created as part of the installation. The Cassandra servicewill also be run as this user.
- Start the Cassandra service:
- Monitor the progress of the startup with:
Cassandra is ready when you see an entry like this in the system.log
:
NOTE: For information on how to configure your installation, seeConfiguring Cassandra.
Cassandra Version
- Check the status of Cassandra:
The status column in the output should report UN
which stands for “Up/Normal”.
Alternatively, connect to the database with:
Further installation info¶
For help with installation issues, see the Troubleshooting section.