本文章适用于Cassandra 2.0.9、Cassandra 2.0.10(2014-08-29日更新,安装2.0.10需把相关脚本调整为2.0.10)。
根据《列存储数据库:apache的cassandra 》一问中的介绍,屁民瑞威将在接下来的一段时间内记录学习cassandra的经过。
本节将介绍在在CentOS 6.4安装Cassandra 2.0.9。为什么是用CentOS 不是Ubuntu?(习惯了)。好了,正文开始。
一、安装jdk1.7
因为Cassdra2.0.9最低要求就是1.7版本,jdk的安装见文章《CentOS 6下安装JDK并配置环境变量》
二、准备用户环境
|
groupadd cassandra
useradd-s/bin/bash-gcassandra-d/opt/cassandra cassandra
|
三、安装cassandra
1、下载
找一个适合的镜像节点:我选的是北京理工大学的节点
|
wget http://mirror.bit.edu.cn/apache/cassandra/2.0.9/apache-cassandra-2.0.9-bin.tar.gz
|
PS:安全起见自己可以验证一下数据完整性
2、解压、设置权限
|
tar-zxvf apache-cassandra-2.0.9-bin.tar.gz -C/opt/cassandra
chown-Rcassandra:cassandra/opt/cassandra
mkdir/var/lib/cassandra
mkdir/var/log/cassandra
chown-Rcassandra:cassandra/var/lib/cassandra
chown-Rcassandra:cassandra/var/log/cassandra
|
3、运行
切换到cassandra用户,运行bin/cassandra
|
cd/opt/cassandra/apache-cassandra-2.0.9/bin/
su cassandra./cassandra
|
如果出现
|
INFO02:34:57,479Compacting[SSTableReader(path='/var/lib/cassandra/data/system/local/system-local-jb-4-Data.db'),SSTableReader(path='/var/lib/cassandra/data/system/local/system-local-jb-3-Data.db'),SSTableReader(path='/var/lib/cassandra/data/system/local/system-local-jb-1-Data.db'),SSTableReader(path='/var/lib/cassandra/data/system/local/system-local-jb-2-Data.db')]
INFO02:34:57,545Node localhost/127.0.0.1state jump tonormal
|
证明成功启动,开一个cqlsh试试
|
root@localhost bin]# ./cqlsh
Connected toTest Cluster at localhost:9160.
[cqlsh4.1.1|Cassandra2.0.9|CQL spec3.1.1|Thrift protocol19.39.0]
UseHELP forhelp.
cqlsh>
|
4、关闭Cassandra
|
ps-aux|grep cassandra
kill pid#pid为cassandra的pid
|
本节完成在centos 6.4安装cassandra 2.0.9/2.0.10。
参考:http://www.datastax.com/documentation/cassandra/2.0/cassandra/gettingStartedCassandraIntro.html
版权声明:本文为【
屁民部落】原创文章,转载时请注明出处!
本文地址:http://pimin.net/archives/84
分享到:
相关推荐
Cassandra实用教程是一份非常有价值的参考文档,它将帮助那些准备使用Cassandra作为数据进行开发的用户提高对Cassandra的认识和使用能力。
Cassandra1.0.x实用教程.pdf
Title: Mastering Apache Cassandra, 2nd Edition Author: Nishant Neeraj Length: 322 pages Edition: 2 Language: English Publisher: Packt Publishing Publication Date: 2015-02-27 ISBN-10: 1784392618 ISBN-...
这个Spring Boot应用程序集成了Kafka和Cassandra。 a) 您可以通过post请求将json数据传递给API,将数据插入Cassandra。它处理这些消息并插入到Cassandra DB中。 Spring Boot版本:1.4.2 JDK版本:1.8 Cassandra/...
See how to get 100 percent uptime with your Cassandra applications using this easy-follow guide Learn how to avoid common and not-so-common mistakes while working with Cassandra using this highly ...
Apache Cassandra is a massively scalable, peer-to-peer database designed for 100 percent uptime, with deployments in the tens of thousands of nodes, all supporting petabytes of data. This book offers ...
资源分类:Python库 所属语言:Python 资源全名:aws-cdk.aws-cassandra-1.104.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
2.Cassandra ⼀一致性实现 2.1 CAS 2.2 Quorum读写 2.3 不不⼀一致产⽣生原因 2.4 Hinted handoff 2.5 Read repair 2.6 Manual repair 3.Cassandra应⽤用场景 4.总结 视频是mp4格式,配套文档下载地址...
Cassandra实战.pdf
Apache Cassandra构建工具 Jenkins Job DSL脚本创建CI作业: jenkins-dsl/ Jenkins Job构建/测试运行时脚本: build-scripts/ Apache Cassandra打包实用程序: cassandra-release/ docker/ 建筑包 创建包含构建...
Tutorialspoint Cassandra 教程.epub
With this hands-on guide, you'll learn how Apache Cassandra handles hundreds of terabytes of data while remaining highly available across multiple data centers—capabilities that have attracted ...
资源分类:Python库 所属语言:Python 资源全名:aws_cdk.aws_cassandra-1.102.0-py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
Cassandra(apache-cassandra-3.11.11-bin.tar.gz)是一套开源分布式NoSQL数据库系统。它最初由Facebook开发,用于储存收件箱等简单格式数据,集GoogleBigTable的数据模型与Amazon Dynamo的完全分布式的架构于一身...
apache-cassandra-3.11.13 官网原版
Mastering Apache Cassand
apache-cassandra-3.11.8-bin
资源分类:Python库 所属语言:Python 资源全名:aws_cdk.aws_cassandra-1.92.0-py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
This book will teach you how to use Storm for real-time data processing and to make your applications highly available with no downtime using Cassandra. The book starts off with the basics of Storm ...