Database Reference
In-Depth Information
2. Installation
Cassandra is a Java application at its core. Because of this, there are certain con-
siderations that need to be taken into account when installing it. This chapter will
highlight the different installation types for the base binary and packages. We will
go over the important configuration items and files. Then, once Cassandra is in-
stalled, we will dive into setting up single- and multinode clusters, assigning the
proper tokens for a cluster, and then ensuring that our cluster is up and running.
Prerequisites
Cassandra requires the most stable release of Java 1.6. While it may run on Java
1.7, it has not been fully tested and vetted for that version. If you are running mul-
tiple versions of Java on a single system, set the JAVA_HOME variable to the path
of the 1.6 version and add 1.6 to the beginning of the user's PATH .
There are several directories that you should be aware of when installing Cas-
sandra. The data directories contain the SSTable files for all ColumnFamilys. This
folder defaults to /var/lib/cassandra/data. The data directories should be on a sep-
arate volume from the system volume. The CommitLog directories store Cas-
sandra's append-only data; the default directory for the CommitLog is /var/lib/cas-
sandra/commitlog. This volume should not reside on the same volume as the sys-
tem or the data directory. The CommitLog relies on the performance of append-
only files, and doing random seeks during append-only writes will greatly affect
the write performance. The saved cache's default directory is located in /var/lib/
cassandra/saved_caches. This directory is where the key/row caches get saved for
faster loading on start-up. By default, Cassandra writes all of its logs to /var/log/
cassandra. All directories need to be writable by the user who is running Cas-
sandra.
Installation
Installation coverage includes installation from Debian and RedHat/CentOS/
Oracle packages and from binaries.
Debian
Add the following to /etc/apt/sources.list.d/cassandra.sources.list:
Search WWH ::




Custom Search