多语言展示
当前在线:1388今日阅读:2今日分享:38

Cassandra Setup

Cassandra是一个混合型的非关系的数据库,类似于Google的BigTable。其主要功能比Dynamo (分布式的Key-Value存储系统)更丰富,但支持度却不如文档存储MongoDB(介于关系数据库和非关系数据库之间的开源产品,是非关系数据库当中功能最丰富,最像关系数据库的。支持的数据结构非 常松散,是类似json的bjson格式,因此可以存储比较复杂的数据类型)。Cassandra最初由Facebook开发,后转变成了开源项目。它是 一个网络社交云计算方面理想的数据库。以Amazon专有的完全分布式的Dynamo为基础,结合了Google BigTable基于列族(Column Family)的数据模型。P2P去中心化的存储。很多方面都可以称之为Dynamo 2.0。
工具/原料
1

jre-7u55-linux-x64

2

apache-cassandra-2.0.7-bin.tar.gz

方法/步骤
1

JRE setup:下载 jre-7u55-linux-x64.rpmrpm -ivh jre-7u55-linux-x64.rpmalternatives --install /usr/bin/java java /usr/java/jre1.7.0_55/bin/java 20000alternatives --config javajava -version

2

Setup: single cluster with 2 nodes下载 apache-cassandra-2.0.7-bin.tar.gztar -xzvf apache-cassandra-2.0.7-bin.tar.gzcd apache-cassandra-2.0.7修改配置文件vi conf/cassandra.yaml  num_tokens: 256  #Notes: recommended value 256 seed_provider:    # Addresses of hosts that are deemed contact points.    # Cassandra nodes use this list of hosts to find each other and learn    # the topology of the ring.  You must change this if you are running    # multiple nodes!    - class_name: org.apache.cassandra.locator.SimpleSeedProvider      parameters:          # seeds is actually a comma-delimited list of addresses.          # Ex: ',,'          - seeds: '192.168.100.74,192.168.100.72'          #Notes: seed node and localhost namelisten_address: 192.168.100.72#Notes: localhost’s nameendpoint_snitch: SimpleSnitch#Notes: If total is only 2 nodes, value is SimpleSnitch. # start the Cassandra servicebin/cassandra -f# stop the CassandraCtrl + C

推荐信息