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.

9 Comments:

At April 4, 2010 at 8:08 PM , Blogger Shuvo said...

Awesome post dude. This is a great article for Cassandra installation in windows xp. We are waiting for the next step for this artical like how to use Cassandra with php or other language.
Good work once again.

 
At April 4, 2010 at 8:22 PM , Anonymous Anonymous said...

Nice and step by step article on cassandra installation for WinXP. Will be very helpful for kick-starting cassandra on win env.
Thnx for the hard-work.
Cheers!!! :)

 
At April 5, 2010 at 12:04 PM , Anonymous Sadiqur Rahman said...

Very helpful post...

 
At June 11, 2010 at 1:52 PM , Anonymous M. Umer said...

I really found it too good, yes it is awesome article and want to see how we will create databases and use Cassandra with PHP

 
At June 22, 2010 at 8:21 PM , Anonymous Mamun said...

Thanks @M.Umer.i will write about creating database and use cassandra with php as soon as possible.

 
At February 9, 2011 at 2:26 PM , Anonymous Anonymous said...

Thanks very helpful

 
At June 10, 2011 at 3:48 PM , Blogger Sumit said...

Hi Mamun,

This was awesome article written on startup of Cassandra. Please post a link if you have for creation of a database. If not yet done can you provide us some links that we can refer to?

Thanks
Sumit Mendiratta

 
At August 15, 2011 at 11:14 PM , Anonymous Anonymous said...

Thank you. Finally I could understand how to install it.

 
At November 9, 2012 at 3:15 PM , Blogger Unknown said...

very nice post explained very clearly about the Cassandra installation in windows xp.thanks for sharing this information. keep on more updates about cassandra.

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home