Cassandra Installation

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Cassandra Installation

Created a folder where the binaries will be installed. We use /app/cassandra/ as the binaries file
location .

1. Verify that request version of java is installed.


Java -version

Note : Datastax recommended the latest build of Technology Compatibility Kit(TCK)


Certified OpenJDk version 8.
If Open jdk version the result should look like :

Open jdk version = “1.8.0_171”

OpenJdk version “1.8.0_171”


Open Jdk Runtime Environment (build 1.8.0_171-8u171-b11-0 ubuntu0.16.04.1-b11)

If Oracle java the result Environment (build 1.8.0_181-b13)


Java Hot Spot (TM) 64 bit server VM ( build 25.181.-b13, mixed mode)

If not OpenJdk 8 or Oracle Java 8 see installing the JDk .

2. When installing from the binary tarball , you can either download the tarball and the extract
the files , or use Curl .

Note : The latest version is 5.1 .To view the available versions , see the Release Notes,

a. Download the tarball from Download DataStax Enterprise.


b. Extract the file:
tar -XZVF dse-version_number-bin.tar.gz

Ex: tar -XZVF dse-5.1.-bin.tar.gz

Use Curl to install the selected version:


Caution: you choose this method , your password is retained in the shell history. To avoid
this security issue, DataStax recommended using Curl with the –netrc or –netrc-file
Download and extract the tarball using curl:

Curl -L https://download.datastax.com/enterprise/dse-5.1-bin.tar.gz | tar XZ


The files are downloaded and extracted into the 5.1 directory.

3.you can use either the default data and logging directory location or define your locations:

 To Use the default data and logging directory location, create and change ownership for the
following :

Sudo mkdir -p /var/lib/cassandra; sudo chown _R $USER:$GROUP /var/lib/cassandra &&

Sudo mkdir -p /var/log/cassandra; sudo chown _R $USER:$GROUP /var/log/cassandra &&

Sudo mkdir -p /var/lib/dsefs; sudo chown _R $USER:$GROUP /var/lib/dsefs &&

 To define your Own data and logging directory locations:

a. In the installation_location/dse-data &&

cd dse-data &&
mkdir data &&
mkdir commitlog &&
mkdir saved_caches &&
mkdir hints &&
mkdir cdc_raw
b. Go to the directory containing the cassandra.yaml file.

Cd installation_location/resource/cassandra/conf
c. Edit the following lines in the cassandra.yaml.

Data_file_directories: Full_path_to_installation_location/dse-data/data
Commitlog_directory: Full_path_to_installation_location/dse-data/commitlog
Saved_caches_directory: Full_path_to_installation_location/dse-data/saved_caches
hints_directory: Full_path_to_installation_location/dse-data/hints
cdc_raw_directory: Full_path_to_installation_location/cdc/raw

 Optional: Define your own Spark directories.

a. Make the directories for the Spark lib and log directories.
b. Edit the Spark -env.sh file to match the locations of your spark lib and log directories, as
described in configuring Spark nodes.
c. Make a directory for the DSEFS data directory and set its location in dsefs_options.
3. You can use either the default data and logging directrory locations or define your locations:
(we use /cassandra/data)

Default directory locations : If you want to use default data and logging directory locations ,
create and change ownership for the for the following :

 /var/lib/cassandra
 /var/log/cassandra

You might also like