cassandra on ubuntu

cssandra 3.4 on ubuntu 14.04 with oracle java8

install oracle java8 virtual machine

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-set-default
java -version

install cassandra 34x

echo “deb http://www.apache.org/dist/cassandra/debian 34x main” | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
echo “deb-src http://www.apache.org/dist/cassandra/debian 34x main” | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list

add 3 public keys from the Apache Software Foundation associated withe the package repositories

gpg —keyserver pgp.mit.edu —recv-keys F758CE318D77295D
gpg —export —armor F758CE318D77295D | sudo apt-key add -

gpg —keyserver pgp.mit.edu —recv-keys 2B5C1B00
gpg —export —armor 2B5C1B00 | sudo apt-key add -

gpg —keyserver pgp.mit.edu —recv-keys 0353B12C
gpg —export —armor 0353B12C | sudo apt-key add -

update package database again

sudo apt-get update

install cassandra

sudo apt-get install cassandra

now cassandra is installed and running

sudo service cassandra status
nodetool status
nodetool info
cqlsh

tune jvm options

sudo vi /usr/bin/cassandra

adjust timezone of log

sudo vi /etc/cassandra/logback.xml
,Asia/Taipei

allow bulk insert via cqlsh

sudo vi /etc/cassandra/cassandra.yaml
batch_size_warn_threshold_in_kb: 5000
batch_size_fail_threshold_in_kb: 50000

allowing others connect cassandra

sudo vi /etc/cassandra/cassandra.yaml
listen_address
rpc_address:
broadcast_address:

- seeds: "127.0.0.1,<ip>"

where is the log

tail -f /var/log/cassandra/system.log

where is the data

/var/lib/cassandra