Home > Database > Mysql Tutorial > 搭建cassandra单数据中心集群(笔记)

搭建cassandra单数据中心集群(笔记)

WBOY
Release: 2016-06-07 15:28:37
Original
1085 people have browsed it

prepare 1.synchronized using NTP(network time protocol) 2.static your IP 3.ssh login without password 4.JDK7 is neccessary start 1.在每一个节点上安装cassandra 2.为集群选取一个名称(这个很重要) 3.获取每一个节点的IP 4.选择一个snitch 下面以一

prepare

1.synchronized using NTP(network time protocol)

2.static your IP

3.ssh login without password

4.JDK7 is neccessary

start

1.在每一个节点上安装cassandra

2.为集群选取一个名称(这个很重要)

3.获取每一个节点的IP

4.选择一个snitch

下面以一个六个节点分为两个机架的集群为例,每个节点配置如下:

cluster_name: 'MyDemoCluster'

auto_bootstrap: false(仅仅当本机作为新的节点时)

num_tokens: 256
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "110.82.155.0,110.82.155.3"
listen_address: 110.82.155.0(每个节点此IP需要改成本机)
rpc_address: 0.0.0.0
endpoint_snitch: RackInferringSnitch

节点信息如下

node0 110.82.155.0 (seed1)
node1 110.82.155.1
node2 110.82.155.2
node3 110.82.156.3 (seed2)
node4 110.82.156.4
node5 110.82.156.5

如果你不熟悉防火墙配置,关闭即可

启动后使用nodetool status检查

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template