Install JRE 7Open a command prompt and type java -version to see if it is installed properly. If not find a jre from oracle and install it. Make sure it's a version 7 at the least (version 6 will not work).
You'll need to set JAVA_HOME. Find the control panel (on windows 8 search for it). Go to "system and security" and then "system". Click on "Advanced Settings" and then the "Environment Variables" button. Click on the new button an in the Variable name box type JAVA_HOME
under the value you'll need to put in the path to the java you are using. Mine is
but yours may be different, especially if you have a jdk. If you are going to program java clients for C* you will need a JDK but that's a different post
Download Cassandra from http://cassandra.apache.org/ probably a file like
You'll need to unpack this file and that will depend on which flavor of windows you have. At this point I'll assume you have a legal copy of winzip or similar. Unpack the downloaded file to the root of the c: or d: drive on your machine
You can now change to the Cassandra install directory in your command prompt, change to the bin directory to start Cassandra, type Cassandra to start it. The window will print a lot of information but you are looking for a line like:
INFO 19:00:31,031 Listening for thrift clients...
to make sure it's working.
CQLSHSo now we have C* running, we need to check we can connect to it. Start by opening another command prompt and type cqlsh. Sadly it won't start, cqlsh now needs an installation of python, so lets get one installed. Download one from http://www.python.org/ and go to downloads then "individual release". click on the 2.x stable release and then
scroll down to the download section. Your looking for the Windows MSI installer. I used:
Download it and run it to install Python, you'll need a version 2 of python, NOTE THIS WELL, version 3 will not work! This installs a nice windows version of python but does not install
a path to the executable. You'll need to set it by hand I guess. Once again Find the control panel (on windows 8 search for it). Go to "system and security" and then "system"
Click on "Advanced Settings" and then the "Environment Variables" button. Under the system variables find PATH. Highlight it and click edit.
Careful! We don't want to wipe the current contents (if you do hit cancel) go to the end of the current path and enter
Note the ; at the beginning. Again this will depend on the current version of python you've installed and should mirror the path to your python installation. Click OK to close the
dialog boxes and open a command prompt again.
Now you should be able to change to the cassandra directory and then the bin directory and type cqlsh. With luck you should get the
cassandra cqlsh prompt:
Connected to Test Cluster at localhost:9160.
[cqlsh 4.1.0 | Cassandra 2.0.4 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
Use HELP for help.
type "use system;" followed by "describe keyspaces;", cqlsh should reply:
You're now connected and ready to start work.
BTW, folks at datastax and apache Cassandra, why is this so hard ? Would Datastax Devcenter work easier ?