1. 下载
http://cassandra.apache.org/,大约15M左右。下载完直接解压即可。
2. 修改conf/cassandra.yaml
替换其中的var/lib/cassandra/ 为安装目录
3. 修改conf/logback.xml
替换其中的${cassandra.logdir} 为安装目录
4. 配置环境变量
添加环境变量CASSANDRA_HOME,值为安装目录,然后添加path环境变量为%CASSANDRA_HOME%in
5. 启动
进入命令行工具,输入cassandra然后回车,显示如下说明启动成功。
INFO 02:49:53 Enqueuing flush of local: 49395 (0%) on-heap, 0 (0%) off-heap INFO 02:49:53 Writing Memtable-local@26225981(8561 serialized bytes, 259 ops, 0%/0% of on/off-heap limit) INFO 02:49:53 Completed flushing D:Program Filesapache-cassandra-2.1.2datadatasystemlocal-7ad54392bcdd35a684174e047860b377syste sition(segmentId=1419389392265, position=98921) INFO 02:49:53 Node localhost/127.0.0.1 state jump to normal INFO 02:49:53 Compacted 4 sstables to [D:Program Filesapache-cassandra-2.1.2datadatasystemlocal-7ad54392bcdd35a684174e047860b377 n 218ms = 0.024979MB/s. 4 total partitions merged to 1. Partition merge counts were {4:1, } INFO 02:49:53 Netty using Java NIO event loop INFO 02:49:53 Using Netty Version: [netty-buffer=netty-buffer-4.0.23.Final.208198c, netty-codec=netty-codec-4.0.23.Final.208198c, nett ocks=netty-codec-socks-4.0.23.Final.208198c, netty-common=netty-common-4.0.23.Final.208198c, netty-handler=netty-handler-4.0.23.Final.2 ty-transport-rxtx=netty-transport-rxtx-4.0.23.Final.208198c, netty-transport-sctp=netty-transport-sctp-4.0.23.Final.208198c, netty-tran INFO 02:49:53 Starting listening for CQL clients on localhost/127.0.0.1:9042... INFO 02:49:53 Binding thrift service to localhost/127.0.0.1:9160 INFO 02:49:53 Listening for thrift clients...
6. 启动客户端工具
重新启动一个命令行,输入cassandra-cli,然后回车,显示如下:
Microsoft Windows [版本 6.1.7601] 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。 C:UsersAdministrator>cassandra-cli Starting Cassandra Client Connected to: "Test Cluster" on 127.0.0.1/9160 Welcome to Cassandra CLI version 2.1.2 The CLI is deprecated and will be removed in Cassandra 3.0. Consider migrating to cqlsh. CQL is fully backwards compatible with Thrift data; see http://www.datastax.com/dev/blog/thrift-to-cql3 Type 'help;' or '?' for help. Type 'quit;' or 'exit;' to quit. [default@unknown]
启动过程中遇到的错误
1: Windows PowerShell 内部错误。加载托管的 Windows PowerShell 失败,返回错误 80070002。 WARNING! Powershell script execution unavailable. Please use 'powershell Set-ExecutionPolicy Unrestricted' on this user-account to run cassandra with fully featured functionality on this platform. Starting with legacy startup options Starting Cassandra Server Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap 解决办法: 安装补丁Windows Management Framework 4.0 (KB2819745)可解决. 地址:http://www.microsoft.com/en-us/download/details.aspx?id=40855 2: Could not reserve enough space for 2097152KB object heap 解决办法: 修改 cassandra.bat 中的JVM参数 set JAVA_OPTS=-ea^ -javaagent:"%CASSANDRA_HOME%libjamm-0.2.8.jar"^ -Xms512m^ -Xmx512m^
7. 图形化界面工具
razorsql免安装下载链接:http://pan.baidu.com/s/1o6xMjOY
注册码:
FWPHZ6EVUZ9E4X2UBHD43KB
FUDPF48C8P3K4WVDBLJ96RA
FRSTAKDMAP438T6NBDJ78BB
F7WLXBF7V33Y7Y2TRKJ67BR
F9PKAV4FPYHKKZJMKMB32RK
jdbc连接驱动:http://pan.baidu.com/s/1kTCf1oN