Before you start you need to be careful that you launch amazon ami instance, personally experienced it does not work for other instances like redhat for unknown reason. Port 9160 which is the thrift port for connecting to cassandra remain closed in the redhat after launching it.
Requirements:
Requirements:
- jdk currently 1.7
- Cassandra tar file currently version 2.0
- Install Java
- Downlaod and install jdk
- download jdk.rpm(ex: jdk-7u51-linux-i586.rpm) from oracle
- Install jdk
- move to the folder contains jdk
rpm -Uvh jdk-7u51-linux-i586.rpm
Set Java_home : export JAVA_HOME=/usr/java/jdk1.7.0_
4
- Install and Configure Cassandra
- download cassandra from Apache Cassandra or run :
- wget http://apache.mirror.anlx.net/cassandra/2.0.4/apache-cassandra-2.0.4-bin.tar.gz
tar -zxvf apache-cassandra-2.0.4-
bin.tar.gz - Create the casssandra necessary folders
- sudo mkdir /var/lib/cassandra
sudo mkdir /var/log/cassandra
sudo mkdir /var/lib/cassandra/data
sudo mkdir /var/lib/cassandra/saved_
caches sudo mkdir /var/lib/cassandra/commitlog - set the permissions
sudo chown -R ec2-user:ec2-user /var/log/cassandra/ sudo chown -R ec2-user:ec2-user /var/lib/cassandra/
- sudo mkdir /var/lib/cassandra
sudo mkdir /var/log/cassandra
sudo mkdir /var/lib/cassandra/data
sudo mkdir /var/lib/cassandra/saved_
cd apache-cassandra-2.0.4/conf
vi cassandra.yaml or nano cassandra.yaml
change listen_address and rpc_address to your private address
change seed and broadcast_address to your public ip address(don't forget to remove the # from the begining of the broadcast_address line)
change the snitch to EC2Snitch
exit from the file
run cassandra: bin/cassandra -f
No comments:
Post a Comment