Home > Developers help > Cassandra > Cassandra installation on Windows 7

Cassandra installation on Windows 7

1. Cassandra is java based application, so first of all you need to install java on your machine.
    Latest JRE you can download from here: http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. Download Cassandra binary files from here: http://cassandra.apache.org/download/

3. Extract Cassandra source files. e.g. to D:\cassandra

4. set environment variables. (Go to  System Properties -> Tab Advanced -> button Environment Variables ... and add system variables here)
JAVA_HOME=c:\Program Files\Java\jre6\ (it should be path to jre directory, not to bin directory ... value I used can be different on your machine)
CASSANDRA_HOME=d:\cassandra

5. modify config file d:\cassandra\conf\storage-conf.xml 
I changed following: 
  <CommitLogDirectory>/var/lib/cassandra/commitlog</CommitLogDirectory>
to 
  <CommitLogDirectory>d:/cassandra/commitlog</CommitLogDirectory>
also I created directory d:/cassandra/commitlog

Next change was:
/var/lib/cassandra/data
I changed it to 

<DataFileDirectory>d:/cassandra/data</DataFileDirectory>
and again I created directory d:/cassandra/data

6. You are ready to start Cassandra
Go to directory d:\cassandra\bin\ and start cassandra.bat 

You should see output like this:
D:\cassandra\bin>cassandra.batStarting Cassandra ServerListening for transport dt_socket at address: 8888 INFO 13:47:17,274 DiskAccessMode 'auto' determined to be mmap, indexAccessModeis mmap INFO 13:47:17,808 Saved Token not found. Using 157384470883646000501029173271571041806 INFO 13:47:17,809 Saved ClusterName not found. Using Test Cluster INFO 13:47:17,815 Creating new commitlog segment d:/cassandra/commitlog\CommitLog-1280922437815.log INFO 13:47:17,886 LocationInfo has reached its threshold; switching in a freshMemtable at CommitLogContext(file='d:/cassandra/commitlog\CommitLog-1280922437815.log', position=419) INFO 13:47:17,903 Enqueuing flush of Memtable-LocationInfo@1370440457(169 bytes, 4 operations) INFO 13:47:17,905 Writing Memtable-LocationInfo@1370440457(169 bytes, 4 operations) INFO 13:47:18,082 Completed flushing d:\cassandra\data\system\LocationInfo-1-Data.db INFO 13:47:18,122 Starting up server gossip INFO 13:47:18,196 Binding thrift service to localhost/127.0.0.1:9160 INFO 13:47:18,204 Cassandra starting up...

And seems like your Cassandra is running on your windows machine
Quality Unit's products

LiveAgent

LiveAgent integrates live chat software and help desk software features into a single customer support solution.

Try it free

Post Affiliate Pro

Post Affiliate Pro is a full featured affiliate tracking software ready to power your own affiliate program.

Buy Now