Setup Cassandra on Windows

Cassandra is...well, you may not be here if you do not know it.
Check out "http://incubator.apache.org/cassandra/" for details.

Many posts tell you it runs on unix/linux. True, recommand so for production.
If you want to use Windows as dev environment, then you can do it as following.

0. install java 6
1. download Cassadra and unzip it to the folder you want to install (the following will assume it is "d:/cd050")
2. right click "my computer" and select "property/advanced/environment varibles", create a new system varible -
   name: JAVA_HOME
   value: C:/Program Files/Java/jdk1.6.0_18
   The value is the path to your java folder installed on your computer. Above is the one on my box.
3. Add another environment variable in the same way -
   name: CASSANDRA_HOME
   value: d:/cd050
   The value is your Canssandra folder, there are subfolders under it like "bin"...
4. now start the default single node server
   d:/> cd d:/cd050/bin
   d:/cd050/bin> canssandra.bat
   You will see "Starting Cassandra Server...Listening...at address: 8888 INFO-...".
5. run the command line client - open another command line window
   d:/> cd d:/cd050/bin
   d:/cd050/bin> canssandra-cli.bat
   You will see a welcome message and the client prompt finally shows up. Let's try some commands here -
   cassandra> connect localhost/9160
   cassandra> show keyspaces
   cassandra> quit
   Your data and logs will go to drive "P:".
   It is actually a mapping to some subfolders of your Cassandra home, find out yourself.
  
   Congrats! Your first Cassandra server on Windows is up and running now.

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值