Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.
The "GettingStarted_ZH" page has been changed by Luikore. http://wiki.apache.org/cassandra/GettingStarted_ZH?action=diff&rev1=1&rev2=2 -------------------------------------------------- == 简介 == Cassandra 是个高级话题, 就算她变得越来越好使,用户还是可能会对初体验感到畏惧。这篇文档目的是提供一些简单的指引,教会新用户如何安装 Canssandra,最终架设起一个可用的集群(Cluster)。 - == 第 0 步: 找到组织 == + == 第零步: 找到组织 == 获取项目、发布、稳定性、臭虫和特性的最佳方式,是订阅用户邮件列表([[mailto:[email protected]|subscription required]]) 和参与到 #cassandra [[http://webchat.freenode.net/?channels=#cassandra|IRC]] 频道。 <<Anchor(picking_a_version)>> @@ -17, +17 @@ 你总能从这里找到最新稳定版的下载链接:[[http://cassandra.apache.org/download|website]]。 === 测试版和发布候选 === - Betas are prototype releases considered ready for user testing, and release candidates have the potential to become the next stable release. These releases represent the state-of-the-art so are often the best place to start, and since APIs and on-disk storage formats can change between major versions this can also save you from an upgrade. The testing and feedback is also highly appreciated. + 测试版和发布候选比稳定发布版更激动人心。由于 API 和磁盘存储格式会和主要版本可能会改变,尝试这些版本会让你更新先人一步。期待小白鼠们的测试和反馈! === Nightly 版本 === - Nightly builds represent the current state of development as of the time of the build. They contain all of the previous day's new features, fixes, and newly introduced bugs. The only guarantee they come with is that they successfully build and the unit tests pass. Nightly builds are a handy way of testing recent changes, or accessing the latest features and fixes not found in beta or release candidates, but there is some risk of them being buggy. + Nightly 版本显示了当前的开发状态,她们包含了前一天添加的所有新特性,臭虫修正和新臭虫。唯一的保障是她们构建成功并通过单元测试了。Nightly 版本是尝试新特性和改动的入手捷径。但是使用有风险,请谨慎。 - The most recent nightly build can be downloaded [[http://hudson.zones.apache.org/hudson/job/Cassandra/lastSuccessfulBuild/artifact/cassandra/build/|here]]. + 最新的 Nightly 版本可以在 [[http://hudson.zones.apache.org/hudson/job/Cassandra/lastSuccessfulBuild/artifact/cassandra/build/|这里]] 下载。 === Subversion === - Cassandra 的 subversion 库是开发者活跃的地方。任何对贡献代码有兴趣的人都可以从 trunk 中检出代码。如果你在 subversion 的代码中运行,一定要常常更新,并且订阅 [[mailto:[email protected]?subject=subscribe|邮件列表]] 以获得最新的消息。 + Cassandra 的 subversion 库是开发活动活跃的地方。任何对贡献代码有兴趣的人都可以从 trunk 中检出代码。如果你在 subversion 的代码中运行,一定要常常更新,并且订阅 [[mailto:[email protected]?subject=subscribe|邮件列表]] 以获得最新的消息。 关于检出代码的指引可以在这里找到 [[http://cassandra.apache.org/download|website]]。 <<Anchor(running_a_single_node)>> - == 第二步:跑一个节点(机器) == + == 第二步:跑一个节点 == - Cassandra 往往以机器集群的方式部署,但是在单台机器上也能跑得很好。为避免一下就碰触到巨大的复杂系统,玩单机是入门良径。 + Cassandra 往往以机器集群的方式部署,但是在单台机器上也能跑得很好。为避免一下就要对付巨大的复杂系统,玩单机是入门良径。 - 现在还没有安装程序,最简单的方法就是从解压的目录<<FootNote(Users of Debian or Debian-based derivatives can install the latest stable release in package form, see DebianPackaging for details.)>> 或者 SVN 检出(参见: [[#picking_a_version|选择一个版本]])目录直接运行 Canssandra。如果你下载的不是二进制版本,你需要先使用 ant 编译它。 + 现在还没有安装程序,最简单的方法就是从解压的目录<<FootNote(Debian 或者 Debian 派生的系统的用户可以直接安装最新的稳定发布版, 参看 DebianPackaging 以获取更多的信息。)>> 或者 SVN 检出(参见: [[#picking_a_version|选择一个版本]])目录直接运行 Canssandra。如果你下载的不是二进制版本,你需要先使用 ant 编译它。 发布版的样例设置 `conf/storage-conf.xml` 包含了一些比较推荐的默认值和注释,但是你要保证 `CommitLogDirectory` 和 `DataFileDirectories` 都存在。 另外,最好也花点时间检查一下 `conf/log4j.properties`,确保配置中指定的目录都存在。 - Some people running OS X have trouble getting Java 6 to work. If you've kept up with Apple's updates, Java 6 should already be installed (it comes in Mac OS X 10.5 Update 1). Unfortunately, Apple does not default to using it. What you have to do is change your `JAVA_HOME` environment setting to `/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home` and add `/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin` to the beginning of your `PATH`. + Mac OS X 的一些用户可能会在运行 Java 6 的时候遇到困难。如果你持续获取 Apple 的最新更新,Java 6 就已经安装好了 (包含于 Mac OS X 10.5 Update 1 中)。 不幸的是,Apple 在默认情况下是不使用它的。 你需要做的是修改环境变量 `JAVA_HOME` 为 `/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home`,并且把 `/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin` 添加到环境变量 `PATH` 中。 - And now for the moment of truth, start up Cassandra by invoking `bin/cassandra -f` from the command line<<FootNote(To learn more about controlling the behavior of startup scripts, see RunningCassandra.)>>. The service should start in the foreground and log gratuitously to standard-out. Assuming you don't see messages with scary words like "error", or "fatal", or anything that looks like a Java stack trace, then chances are you've succeeded. To be certain though, take some time to try out the examples in CassandraCli and ThriftInterface before moving on. Also, if you run into problems, Don't Panic, calmly proceed to [[#if_something_goes_wrong|If Something Goes Wrong]]. + 万事俱备,只欠东风,现在你可以在命令行中运行 `bin/cassandra -f`<<FootNote(若想知道更多关于启动脚本的信息,参看 RunningCassandra。)>> 来启动 Cassandra 了! 服务应该在前台启动(非后台方式),并且把日志打印到标准输出上。如果你没看到吓人的词汇(如 "error" 或者 "fatal"), 或者像 java stack trace 之类的东西, 那么你就成功了。请随意尝试 CassandraCli 和 ThriftInterface 的例子。遇到问题莫恐慌,冷静的看看 [[#if_something_goes_wrong|出岔子了!]]。 == 第三步:跑一个集群 == 建设一个 Cassandra 集群 ''几乎'' 就是对每个节点重复 [[#running_a_single_node|第二步]]。 不过还是有一些例外。 @@ -65, +65 @@ 如果你没有足够多的机器去试验 Cassandra 集群,你可以访问 EC2 并尝试 [[Cassandra EC2]]。 == 第四步: 跑一堆集群——啊不,写你程序! == - Cassandra 使用 [[http://incubator.apache.org/thrift/|Thrift]] 作为它的客户端接口 API。 Cassandra 的主 API/RPC/Thrift 接口是 9160。 Thrift 支持[[http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/|很多种编程语言的访问]],所以你可以只使用 Thrift 来访问, 或者使用 [[http://wiki.apache.org/cassandra/ClientOptions|高级点的客户端]] 来访问 Cassandra。 请参考 [[http://wiki.apache.org/thrift|Thrift wiki]], 开卷有益。在动手之前还可以看看 ThriftExamples 中的 Cassandra 样例。 + Cassandra 使用 [[http://incubator.apache.org/thrift/|Thrift]] 作为它的客户端接口 API。 Thrift 支持[[http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/|很多种编程语言的访问]],所以你可以只使用 Thrift 来访问, 或者使用 [[http://wiki.apache.org/cassandra/ClientOptions|高级点的客户端]] 来访问 Cassandra。 请参考 [[http://wiki.apache.org/thrift|Thrift wiki]], 开卷有益。在动手之前还可以看看 ThriftExamples 中的 Cassandra 样例。 Cassandra 的主 API/RPC/Thrift 使用的端口是 9160。 不要和 JMX 端口弄混了哦! @@ -74, +74 @@ <<Anchor(if_something_goes_wrong)>> == 出岔子了! == - If you followed the steps in this guide and failed to get up and running, we'd love to help. Here's what we need. + 如果你按照指引的步骤做了,但是没跑成功,我们很乐意帮助。为了解决问题,请告诉我们充分的信息: - 1. If you are running anything other than a stable release, please upgrade first and see if you can still reproduce the problem. - 1. Make sure debug logging is enabled (hint: `conf/log4j.properties`) and save a copy of the output. - 1. Search the [[http://news.gmane.org/gmane.comp.db.cassandra.user|mailing list archive]] and see if anyone has reported a similar problem and what, if any resolution they received. + 1. 如果你跑的不是稳定发布版,请先更新,看看问题是否重现。 + 1. 把日志 level 设为 debug (修改 `conf/log4j.properties`) 并保存输出的结果。 + 1. 在 [[http://news.gmane.org/gmane.comp.db.cassandra.user|邮件列表存档]] 上搜索,看看是不是别人也遇到过这个问题,是否解决了这个问题。 - 1. Ditto for the [[https://issues.apache.org/jira/browse/CASSANDRA|bug tracking system]]. + 1. 登录到 [[https://issues.apache.org/jira/browse/CASSANDRA|bug 追踪系统]] 上。 - 1. See if you can put together a unit test, script, or application that reproduces the problem. + 1. 提交一份可以重现问题的代码。 - Finally, post a message with all relevant details to the list ([[mailto:[email protected]|subscription required]]), or hop onto [[http://webchat.freenode.net/?channels=#cassandra|IRC]] (network irc.freenode.net, channel #cassandra) and let us know. + 最后,在邮件列表上提交一份包含详细内容的信息 ([[mailto:[email protected]|需要先订阅]]), 或者跑到 [[http://webchat.freenode.net/?channels=#cassandra|IRC]] (network irc.freenode.net, channel #cassandra) 上吱一声。 <<BR>> <<BR>>
