Archivo

Archivo para la categoría ‘Raspberry Pi’ XML Feed

Installing Cassandra 2.1 on Raspberry Pi


1. Download Oracle JDK8 for ARM on your RaspberryPi and get the resulting file to your ‘home’ folder on Raspbian:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-arm-downloads-2187472.html

2. UnTAR the file jdk-8u6-linux-arm-vfp-hflt.tar.gz:

# tar xvzf jdk-8u6-linux-arm-vfp-hflt.tar.gz -C /opt

3. Set default java and javac to the new installed JDK8.

# update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_06/bin/java 1
# update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_06/bin/javac 1
# update-alternatives --set java /opt/jdk1.8.0_06/bin/java
# update-alternatives --config javac
# update-alternatives --config java
# update-alternatives --display java

4. Now,  check that version 1.8 is really installed

# java -version

This order should return something similar to:

java version "1.8.0_06"
Java(TM) SE Runtime Environment (build 1.8.0_06-b23)
Java HotSpot(TM) Client VM (build 25.6-b23, mixed mode)

5. Export JAVA_HOME path variable:

# export JAVA_HOME="/opt/jdk1.8.0_06"
# export PATH=$PATH:$JAVA_HOME/bin

6. Now, it is time to download Apache Cassandra:
# wget http://mirror.reverse.net/pub/apache/cassandra/2.1.2/apache-cassandra-2.1.2-bin.tar.gz

7. UnTAR and move the main directory to /opt:

# tar -xvsf apache-cassandra-2.1.2-bin.tar.gz
# mv apache-cassandra-2.1.2 /opt/cassandra

8. Download and replace snappy-java:

# cd /opt/cassandra/lib
# mv snappy-java-1.0.5.2.jar snappy-java-1.0.5.2.jarX
# wget https://oss.sonatype.org/content/repositories/snapshots/org/xerial/snappy/snappy-java/1.1.1.7-SNAPSHOT/snappy-java-1.1.1.7-SNAPSHOT.jar

And now, launch Cassandra…
/opt/cassandra/bin/cassandra -f

You will know if cassandra is running succesfully if you are able to see the line:

 Listening for thrift clients...


Categories: BigData, Cassandra, Linux, Raspberry Pi Tags:

Miércoles, 31 de diciembre de 2014 Sin comentarios