# Download Installer from http://cassandra.apache.org/download/
# Java required
# Create folders
mkdir c:\apache-cassandra
mkdir c:\apache-cassandra\node1
mkdir c:\apache-cassandra\node2
mkdir c:\apache-cassandra\node3
mkdir c:\apache-cassandra\node4
mkdir c:\apache-cassandra\node5
mkdir c:\apache-cassandra\node6
# Create for each node
mkdir :c\apache-cassandra\node1\var
mkdir :c\apache-cassandra\node1\var\commitlog
mkdir :c\apache-cassandra\node1\var\data
mkdir :c\apache-cassandra\node1\var\log
mkdir :c\apache-cassandra\node1\var\saved_caches
#repeat for each node ....
# Extract Cassandra to each Node
cd \apache-cassandra\node1
tar -xzvf apache-cassandra-1.2.x-bin.tar.gz
cd \apache-cassandra\node6
tar -xzvf apache-cassandra-1.2.x.tar.gz
...
# Open hosts file
notepad c:\windows\system32\drivers\etc\hosts
# Add localhost IPs for each node in hosts file
127.0.0.1 127.0.0.1 #node1
127.0.0.1 127.0.0.2 #node2
127.0.0.1 127.0.0.3 #node3
127.0.0.1 127.0.0.4 #node4
127.0.0.1 127.0.0.5 #node5
127.0.0.1 127.0.0.6 #node6
# Open cassandra.yaml for each node
cd \apache-cassandra\node1\conf
notepad cassandra.yaml
# Edit each yaml, make node1 and 2 as seeders, edit correspondingly
cluster_name: 'SpikesCluster'
num_tokens: 256
rpc_address : 127.0.0.1 #assigned ip of node
listen_address : 127.0.0.1 #assgiend ip of node
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "127.0.0.1, 127.0.0.2" #ip of seeder nodes
saved_caches_directory: /apache-cassandra/node1/var/saved_caches
data_file_directories:
- /apache-cassandra/node1/var/data
commitlog_directory: /apache-cassandra/node1/var/commitlog
#Open log4j-server.properties
notepad c:\apache-cassandra\node1\conf\log4j-server.properties
# edit config, repeat for each node
log4j.appender.R.File=/apache-cassandra/node1/var/log/system.log
# Open Cassandra.bat
notepad c:\apache-cassandra\node1\bin\cassandra.bat
# Edit Port and repeat for each node must not be the same since running on local
-Dcom.sun.management.jmxremote.port=7199^
# Run each node
c:\apache-cassandra\node1\bin\catalina.bat
# Check Cassandra ring information
c:\apache-cassandra\node1\bin\nodetool -h 127.0.0.1 -p 7199 ring
No comments:
Post a Comment