Subscribe to Posts by Email

Subscriber Count

    696

Disclaimer

All information is offered in good faith and in the hope that it may be of use for educational purpose and for Database community purpose, but is not guaranteed to be correct, up to date or suitable for any particular purpose. db.geeksinsight.com accepts no liability in respect of this information or its use. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content and if notify any such I am happy to remove. Product and company names mentioned in this website may be the trademarks of their respective owners and published here for informational purpose only. This is my personal blog. The views expressed on these pages are mine and learnt from other blogs and bloggers and to enhance and support the DBA community and this web blog does not represent the thoughts, intentions, plans or strategies of my current employer nor the Oracle and its affiliates or any other companies. And this website does not offer or take profit for providing these content and this is purely non-profit and for educational purpose only. If you see any issues with Content and copy write issues, I am happy to remove if you notify me. Contact Geek DBA Team, via geeksinsights@gmail.com

Pages

Cassandra for Oracle DBA’s Part 6 – Installing Cassandra

Installing Cassandra is straight forward, With CCM, is a tool to simulate a Cassandra cluster in a single host, Ideal for test environments or you want to make your hands on in Cassandra.

Further to install Cassandra in production size, you can directly download the Cassandra from Apache.org or Datastax for an enterprise version.

I cover here both of these methods.

For CCM Installation,

Step 1: Upgrade Python to 2.7 (this is must for ccm based installations also we have to do alternate install for python to upgrade 2.7 if not this will break your libraries.)

   cd /usr/src

   wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz

   tar xzf Python-2.7.10.tgz

  cd Python-2.7.10

  ./configure

  make altinstall

  ls -ltr /usr/bin/python*

  ls -ltr /usr/local/bin/python*

  ln -s /usr/local/bin/python2.7 /usr/local/bin/python

  ln -s /usr/local/bin/python2.7 /usr/local/bin/python

  wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

  sudo /usr/local/bin/python2.7 ez_setup.py

  sudo /usr/local/bin/easy_install-2.7 pip

  sudo easy_install six

  sudo easy_install pyyaml

 

Step 2: Download the CCM Package from Git hub

git clone https://github.com/pcmanus/ccm.git

or

pip install ccm

change the setup.py to point to /usr/local/bin/python instead of /usr/bin/env python (this is important if not CCM will not work)

cd ccm; sudo ./setup.py install; cd ..

Step 3: Creating a CCM cluster for DSE stack (this command only download the Cassandra to the directory you are running into)

ccm create --version 1.2.0 --nodes 3 --start test

or 

ccm create dse_cluster --dse --dse-username=emaildi --dse-password=password -v 4.5.2 -n 3 -s

Step 4: Verify the installation

root@wash-i-16ca26c8-prod ~/.ccm/repository/4.5.2/resources/cassandra/conf $ ccm node4 nodetool ring

Note: Ownership information does not include topology; for complete information, specify a keyspace

Datacenter: Cassandra

==============

Address    Rack        Status State   Load            Owns                Token

127.0.0.1  rack1       Up     Normal  3.05 MB         33.33%              -9223372036854775808

127.0.0.2  rack1       Up     Normal  2.99 MB         33.33%              -3074457345618258603

 

127.0.0.3  rack1       Up     Normal  3.5 MB          33.33%              3074457345618258602

 

Installing Cassandra Cluster Manually on each of the node

Step 1: Downloading and Installing Cassandra

 

sudo su - cassandra

wget http://mirrors.ae-online.de/apache/cassandra/2.1.3/apache-cassandra-2.1.3-bin.tar.gz

sudo tar -xvf /home/cassandra/apache-cassandra-2.1.3-bin.tar.gz -C /usr/local/

cd /usr/local/

sudo mv apache-cassandra-2.1.3 cassandra-2.1.3

sudo ln -s /usr/local/cassandra-2.1.3 /usr/local/cassandra

sudo chown -R cassandra:cassandra /usr/local/cassandra-2.1.3

xport JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")

export CASSANDRA_INSTALL=/usr/local/cassandra

export CASSANDRA_HOME=$CASSANDRA_INSTALL

Just edit the $CASSANDRA_HOME/conf/cassandra.yaml file vim $CASSANDRA_HOME/conf/cassandra.yaml and replace the following keys with proper values:

cluster_name: 'MyFirstCluster'

seeds: "10.64.200.47, 10.64.200.48"

listen_address: 10.64.200.47

rpc_address: 10.64.200.47

Note: Seeds address are those nodes performing as seed, Listen and RPC address should be the node IP which you have installed.

Step 2: Start Cassandra on all nodes

$CASSANDRA_HOME/bin/cassandra -f

Step 3: Check status of cluster

$CASSANDRA_HOME/bin/nodetool status

-Thanks

Geek DBA

1 comment to Cassandra for Oracle DBA’s Part 6 – Installing Cassandra