Installing the DataStax Distribution of Apache Cassandra 3.11
Instructions for installing the DataStax Distribution of Apache Cassandra 3.11 on any supported Linux-based platform.
Use these instructions for installing the DataStax Distribution of Apache Cassandra™ (DDAC) on any Linux-based platform using a binary tarball.
Tip: To upgrade Apache Cassandra to DDAC, see Upgrading Apache Cassandra to DDAC.
Here are some things to know about DDAC:
- The latest version of DDAC is 5.1.18.
- DDAC is based on Apache Cassandra 3.11 and DataStax Enterprise (DSE) 5.1.
- DDAC runs as a stand-alone process.
Warning: When DDAC is installed, it creates a
cassandra
user in the database. Do not use the
cassandra
user in production. Failing to do so is a security
risk. Prerequisites
- A supported platform. DDAC supports the same platforms as listed in the DSE 5.1 (x86_64) column.
- Configure your operating system to use the latest version of
Java 8:
- Recommended. The latest build of a Technology Compatibility Kit (TCK)
Certified OpenJDK version 8. For example, OpenJDK
8 (1.8.0_151
minimum).Note: Recommendation changed due to the end of public updates for Oracle JRE/JDK 8. See Oracle Java SE Support Roadmap.
- Supported. Oracle Java SE 8 (JRE or JDK) (1.8.0_151 minimum)
- Recommended. The latest build of a Technology Compatibility Kit (TCK)
Certified OpenJDK version 8. For example, OpenJDK
8 (1.8.0_151
minimum).
- RedHat-compatible distributions require EPEL (Extra Packages for Enterprise Linux).
-
Python 2.7.x
For older RHEL distributions, see Installing Python 2.7 on older RHEL-based package installations.
- Hardware selection
Procedure
Important: By downloading the DataStax Distribution of Apache Cassandra™, you confirm that you agree to the DataStax Distribution of Apache Cassandra Terms.
In a terminal window:
-
Verify that a required version of Java is installed:
java -version
Note: DataStax recommends the latest build of a Technology Compatibility Kit (TCK) Certified OpenJDK version 8.If OpenJDK, the results should look like:openjdk version "1.8.0_171" OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11) OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
If Oracle Java, the results should look like:java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
If not OpenJDK 8 or Oracle Java 8, see Installing supporting software.
-
To download the DDAC binaries, contact DataStax Support.
Support will provide an up-to-date link to download DDAC.
-
Extract the files:
tar -xzvf ddac-version_number-bin.tar.gz
For example:
tar -xzvf ddac-5.1.18-bin.tar.gz
-
Define the data and logging directory locations, use one of the following
options:
- Default directory locations - No action is required. When the
directory locations are excluded or commented out in the cassandra.yaml, Cassandra uses
the default locations:
data_file_directories
: installation_location/data/datacommitlog_directory
: installation_location/data/commitlogsaved_caches_directory
: installation_location/data/saved_cacheshints_directory
: installation_location/data/hintscdc_raw_directory
installation_location/data/cdc_raw
- Recommended directory locations - Most production deployments
store data and logs in /var/lib/cassandra. To use the
recommended location:
- Create and change owners for the
/var/lib/cassandra
directory:
sudo mkdir -p /var/lib/cassandra; sudo chown -R \ $USER:$GROUP /var/lib/cassandra
Tip: Ensure that the account that runscassandra
has write access to directory for data and logs. The subdirectories are automatically created. - Go the directory containing the cassandra.yaml
file:
cd installation_location/conf
- Uncomment the following lines in the
cassandra.yaml
file:
data_file_directories: - /var/lib/cassandra/data commitlog_directory: /var/lib/cassandra/commitlog saved_caches_directory: /var/lib/cassandra/saved_caches hints_directory: /var/lib/cassandra/data/hints cdc_raw_directory: /var/lib/cassandra/cdc_raw
Tip: When using a minimal YAML, add the options as shown above.
- Create and change owners for the
/var/lib/cassandra
directory:
- Custom location - To define custom data and logging directory locations:
- Create the directories for data and logging directories. For
example:
mkdir ~/scratch/test/data && mkdir ~/scratch/test/commitlog && mkdir ~/scratch/test/saved_caches && mkdir ~/scratch/test/data/hints && mkdir ~/scratch/test/cdc_raw
Tip: Ensure that the account that runscassandra
has write access to directory for data and logs. - Go the directory containing the cassandra.yaml
file:
cd installation_location/conf
- Edit the following lines in the cassandra.yaml
file:
data_file_directories: - /Users/janedoe/scratch/test/data commitlog_directory: /Users/janedoe/scratch/test/commitlog saved_caches_directory: /Users/janedoe/scratch/test/saved_caches hints_directory: /Users/janedoe/scratch/test/data/hints cdc_raw_directory: /Users/janedoe/scratch/test/cdc_raw
- Create the directories for data and logging directories. For
example:
- Default directory locations - No action is required. When the
directory locations are excluded or commented out in the cassandra.yaml, Cassandra uses
the default locations:
- Optional:
Single-node cluster installations only.
What's next
- You must change or delete the
cassandra
user created on installation. See changing superuser accounts. - Configure startup options: stand-alone.
- Configuration and log file locations .
- Changing logging locations after installation.
- Starting and stopping DataStax Enterprise.
- Recommended production settings.
- Planning and testing DSE and Apache Cassandra deployments.
- Configuring the heap dump directory to avoid server crashes.