How to : Setup a Single node Cassandra 2.1.8 on Ubuntu 14.04.3 using Tarball

Cassandra is getting more attention and use by a lot of company.. even with my previous employer we deploy a lot of Cassandra in cloud.

For now im working on my Mac Mini using VMFusion.

Assumption :
Install basic config of Ubuntu 14.04.3
Disk :
/cassdata = 20G
/casslog = 20G

i’ll be using the default configuration, no editing of cassandra.yaml.

1.install Oracle Java

     sudo add-apt-repository -y ppa:webupd8team/java
     sudo apt-get update
     sudo aptitude -y install oracle-java8-installer
      cassandra@casslnx01:~$ java -version
       java version "1.8.0_60"
       Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
      Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode

2.Download Cassandra tarball

cassandra@casslnx01:~$ pwd
cassandra@casslnx01:~$ wget
--2015-08-19 22:35:34--
Resolving (, 2001:4801:7828:101:be76:4eff:fe11:7b9d
Connecting to (||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24592258 (23M) [application/x-gzip]
Saving to: ‘apache-cassandra-2.1.8-bin.tar.gz’

100%[======================================================================================================================>] 24,592,258  1.86MB/s   in 31s   

2015-08-19 22:36:06 (784 KB/s) - ‘apache-cassandra-2.1.8-bin.tar.gz’ saved [24592258/24592258]


3. Extract the tarball

cassandra@casslnx01:~$ tar -xvzf apache-cassandra-2.1.8-bin.tar.gz 
cassandra@casslnx01:~$ mv apache-cassandra-2.1.8 ~/cassandra

4. Set the Directory and Variables

cassandra@casslnx01:~$ df -h | grep cass
/dev/sdb1        20G   45M   19G   1% /cassdata
/dev/sdc1        20G   45M   19G   1% /casslog

cassandra@casslnx01:~$ sudo chown -R $USER:$GROUP /cassdata
cassandra@casslnx01:~$ sudo chown -R $USER:$GROUP /casslog
cassandra@casslnx01:~$ mkdir /cassdata/cassandra
cassandra@casslnx01:~$ mkdir /casslog/cassandra
cassandra@casslnx01:~$ sudo ln -s /cassdata/cassandra /var/lib/cassandra
cassandra@casslnx01:~$ sudo ln -s /casslog/cassandra /var/log/cassandra

export CASSANDRA_HOME=~/cassandra

5. Start and test your Cassandra


sudo sh ~/cassandra/bin/cassandra

cassandra@casslnx01:~/cassandra/bin$ cqlsh
Connected to Test Cluster at
[cqlsh 5.0.1 | Cassandra 2.1.8 | CQL spec 3.2.0 | Native protocol v3]
Use HELP for help.

cassandra@casslnx01:~/cassandra/bin$ nodetool status
Datacenter: datacenter1
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Tokens  Owns (effective)  Host ID                               Rack
UN  51.64 KB   256     100.0%            1636eb98-20b1-499e-81f3-db1b1ecbaa74  rack1

now our single node cassandra cluster is up and running..


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s