# 罗嗦一句,Cassandra是由社交网站FaceBook开发的Key/Value数据库,后将源码贡献给开源社区,现已更新至1.2.5稳定版。
# 本文安装环境为windows7 Ultimate,cassandra为1.2.4。
# 首先设置Java的环境变量 JAVA_HOME为C:\Program Files\Java\jre6,是系统变量而非用户变量。
# 将Apache-Cassandra-1.2.4-bin.tar.gz解压至C:\apache-cassandra-1.2.4,修改该目录C:\apache-cassandra-1.2.4\conf\中的两个文件:log4j-server.properties和cassandra.yaml
1、将文件log4j-server.properties中的
# Edit the next line to point to your logs directory
log4j.appender.R.File=/var/log/cassandra/system.log
改为
# Edit the next line to point to your logs directory
log4j.appender.R.File=/apache-cassandra-1.2.4/system.log
2、将文件cassandra.yaml中的
# directories where Cassandra should store data on disk.
data_file_directories:
- /var/lib/cassandra/data
# commit log
commitlog_directory: /var/lib/cassandra/commitlog
# saved caches
saved_caches_directory: /var/lib/cassandra/saved_caches
改为
# directories where Cassandra should store data on disk.
data_file_directories:
- /apache-cassandra-1.2.4/data
# commit log
commitlog_directory: /apache-cassandra-1.2.4/commitlog
# saved caches
saved_caches_directory: /apache-cassandra-1.2.4/saved_caches
最后在cmd下运行Cassandra.bat,即可。
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>cd\
C:\>
C:\>cd C:\apache-cassandra-1.2.4\bin
C:\apache-cassandra-1.2.4\bin>cassandra.bat
Starting Cassandra Server
INFO 15:27:36,027 Logging initialized
INFO 15:27:36,081 32bit JVM detected. It is recommended to run Cassandra on a
64bit JVM for better performance.
INFO 15:27:36,086 JVM vendor/version: Java HotSpot(TM) Client VM/1.6.0_41
INFO 15:27:36,134 Heap size: 1067057152/1067057152
INFO 15:27:36,135 Classpath: C:\apache-cassandra-1.2.4\conf;C:\apache-cassandra
# saved caches
saved_caches_directory: /var/lib/cassandra/saved_caches
# saved caches
saved_caches_directory: /var/lib/cassandra/saved_caches
# saved caches
saved_caches_directory: /var/lib/cassandra/saved_caches