[DEPRECATED] CentOS 6: Install Apache Cassandra using Datastax

Versions

  • CentOS 6.3
  • Oracle Java JDK 1.6
  • Note: if running with WSO2 Data Services Server 3.0.1, only Apache Cassandra 1.1 is supported
  • Apache Cassandra 1.2.3 or 1.1.9
  • JNA 3.5.1

Prerequisites

  • WARNING: Cassandra will fail with no or an erroneous error message if run with openjdk 1.6!
  • Install Oracle JDK

Install

1. Edit /etc/yum.repos.d/datastax.repo

2. Install Cassandra

For Apache Cassandra 1.2.3:

For Apache Cassandra 1.1.9:

3. Install a copy of JNA jar just for Cassandra
Note: JNA from base repo is 3.2.4 while Cassandra requires 3.2.7+

4. Fix permissions

Configure

1. Edit /etc/profile.d/cassandra.sh

2. Load into current session:

3. Edit the following settings in /etc/cassandra/conf/cassandra.yaml:

Note: for more details about configuring and optimizing a multi-node cluster, see sources.

Example:

4. Open ports

  • 7199 for JMX
  • 9160 for Cassandra Thrift
  • 7000 for Cassandra Gossip

See Open a port for iptables

5. Start cassandra:

6. Start cassandra on boot:

Test

Test First Node

Note: only use this test on the first node of the cluster

Enter at cassandra-cli:

Verify:

Test Other Nodes

Output:

See Open a port for iptables

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">