Saturday, April 3, 2010

Cassandra Installation on WindowsXP

1.About Cassandra :
Cassandra is an open source distributed database management system. It is an Apache Software Foundation top-level project designed to handle very large amounts of data spread out across many commodity servers while providing a highly available service with no single point of failure. It is a No SQL solution that was initially developed by Facebook and powers their Inbox Search feature.
Want to Know more? Visit
Cassandra database
Apache Cassandra

2.Cassandra Installation on WindowsXP
First we need to download Cassandra.For Download Cassandra Click this link Download. Now unzip the file and put it into a drive where you want to install Cassandra.you can change the folder name cause deafult name is "apache-cassandra-0.5.1".its to long to remember easily.So i change my unzip folder name to "cassandra". Now we have our Cassandra in a spacific drive.Lets go install and configur Cassandra database on windowsXP.You need to install java 1.6.for JAVA download
i) First Step :
First we need to add Two Environment Variables. One for java and other for Cassandra home Directory.Bellow show how to set the Environment Variables on WindowsXp.

Click start then select My Computer and Click Right button on mouse.After that it show System properties Tab manu.Now Select Advanced Tab.


 Now select Environment Variables button.Its open Environment Variables set window like bellow.


Now Select New From System Variables Section.its open a new window like bellow.


Fill Variable name section to "JAVA_HOME" and Variable value to java jdk path. I install java to my C:\program files folder for this my java jdk path is "C:\program Files\java\jdk1.6.0_18" please change this path with your java installation path. same way set CASSANDRA_HOME path.my Cassandra is "F:\cassandra" casue i put Cassandra unzip folder to f drive and i change it to cassandra.please change it with your cassandra dirve.



Now click ok->apply and your Environment Variables setting is completed.Now lest go to run Cassandra and connect with database.Again Click Start then click run and type cmd in text box on run window and Enter .it open commend mode on windows.Like this.
Now type f: then enter and then type cd cassandra\bin and enter.here f is the drive where my cassandra folder is.now its look like this

First you need some change in configuration file . for edit configuration file please open "storage-conf.xml" file on any txt editor and write this line under

<replicationfactor>1</replicationfactor> tag.

<commitlogdirectory>F:/cassandra/data/commitlog</commitlogdirectory>
<datafiledirectories>
<datafiledirectory>F:/cassandra/data/data</datafiledirectory></datafiledirectories>
<calloutlocation>F:/cassandra/data/callouts</calloutlocation>
<stagingfiledirectory>F:/cassandra/data/staging</stagingfiledirectory>

you find this configuration file on F:\cassandra\conf this location. please change Directory with your Cassandra Directory. Now type cassandra.bat and Enter.if it run correctly the commend prompt show like this
Its mean the Cassandra server run correctly.if you check your my computer then you found there is a extra drive created with same name where your Cassandra folder is.Now type cassandra-cli.bat on your commend and Enter.it will show a welcome message.now connect with Thrift.type connect / its mean connect localhost/9160 and enter.here 9160 is your ThriftPort that define in configuration file in defult.after run this commend your commend prompt look like this

its show connected to localhost/9160 its mean you are connect to Thrift.if want to check is your connection is ok or not type show keyspaces and enter.its shows your default Keyspace name.like this

That's all for now .In my next post i try to told you about how to create database and other.

Please told me is this helpful.i am not good in English if do any mistake please forgive me.