Installing Cassandra in RHEL 7.3 in AWS based instance

by Marc Cortada 20/05/2017

This snippet installs Cassandra in the image Red Hat Enterprise Linux 7.3 available in Amazon Web Services.

To make sure that this deployment will work you should create an instance with minimum of 8GB of memory. This is because the minimum requirements of JVM to enable an efficient garbage collection.

Some attention points:

  • After a restart of the server Cassandra won't run as a service.
  • Is recommended to use instances with more memory, specially for production servers.
  • These commands are executed in background when the instance is running and could take some time to finish. If you login just when the instance is available the installation could be not ready yet.

User data:

#!/bin/bash
yum install java-1.8.0-openjdk -y
echo "[datastax]" >> /etc/yum.repos.d/datastax.repo
echo "name = DataStax Repo for Apache Cassandra" >> /etc/yum.repos.d/datastax.repo
echo "baseurl = http://rpm.datastax.com/community" >> /etc/yum.repos.d/datastax.repo
echo "enabled = 1" >> /etc/yum.repos.d/datastax.repo
echo "gpgcheck = 0" >> /etc/yum.repos.d/datastax.repo
yum install dsc30 -y
yum install cassandra30-tools -y
service cassandra start

This snippet is adapted and based from these websites:

Tags:

Categorías: Amazon Web Services (AWS) | AWS User Data | BBDD | BigData | Cassandra

Entradas por mes