Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save avinash-mishra/e37d36d16fcee9f28d91446aeb5ba2e2 to your computer and use it in GitHub Desktop.

Select an option

Save avinash-mishra/e37d36d16fcee9f28d91446aeb5ba2e2 to your computer and use it in GitHub Desktop.
How to setup a Cassandra 2.x Cluster in AWS EC2 / Amazon Linux

Cassandra 2.x Cluster on AWS EC2

Install java 8

# Remove java 7
sudo yum remove -y java

# Install basic packages
sudo yum install -y git

# Download and install java 8
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz"
tar -xzvf jdk-8u45-linux-x64.tar.gz
rm -rf jdk-8u45-linux-x64.tar.gz

# Configure JAVA_HOME
sudo vim ~/.bashrc
alias cls='clear'

export JAVA_HOME=~/jdk1.8.0_45
export JRE_HOME=~/jdk1.8.0_45/jre
export PATH=$PATH:~/jdk1.8.0_45/bin:/~/jdk1.8.0_45/jre/bin
source ~/.bashrc 
java -version

Cassandra 2.x

wget https://archive.apache.org/dist/cassandra/2.1.9/apache-cassandra-2.1.9-bin.tar.gz
tar -xzvf apache-cassandra-2.1.9-bin.tar.gz
rm -rf apache-cassandra-2.1.9-bin.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment