- Download cassandra
- Configure
export CASSANDRA_HOME=/home/test/local/cassandra - configure
$CASSANDRA_HOME/conf/cassandra.yamlas follows:
cluster_name: '[Your Cluster Name]'
listen_address: [public_ip_address]
rpc_address: [public_ip_address]
endpoint_snitch: GossipingPropertyFileSnitch
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: "<ip1>,<ip2>,<ip3>"
- seeds: "127.0.0.1,192.168.72.163,192.168.72.162"
auto_bootstrap: falserm -rf $CASSANDRA_HOME/data/data/system/*if you installed a cluster before- Start cluster
$CASSANDRA_HOME/bin/cassandra
Verify our cluster:
[test@gamma cassandra]$ bin/nodetool status
Datacenter: dc1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 192.168.72.162 161.27 KiB 256 100.0% bb16fed5-e5a4-460f-9c6a-2bacb118fa87 rack1
UN 192.168.72.163 160.78 KiB 256 100.0% b111d838-32f4-492f-b561-0375d849af78 rack1