Setup Cassandra on Windows

本文详细介绍了如何在Windows环境下安装并配置Cassandra数据库系统。步骤包括安装Java 6、下载及解压Cassandra软件包、设置环境变量、启动Cassandra服务器以及运行命令行客户端等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值