Setup a multinode Cassandra using Ubuntu 12.04 and Virtualbox

1. Setup virtual machines (3 for exmaple)

2. Config Cassandra

  • Modify /conf/cassandra-env.shfile.

    MAX_HEAP_SIZE="512M"
    HEAP_NEWSIZE="128M"
    
  • Modify /conf/cassandra.yaml file. For each virtual machine, change listen_address and rpc_addressaccordingly.

    listen_address: 192.168.1.1
    rpc_address: 192.168.1.1
    
  • Choose one first machine as seed. Then change seeds to its ip address, make the rest VM pointing to the same seed.

    seeds: - 192.168.1.1
    
  • Assign initial_token, using the this python code to generate initial token and modify the initial_token in .yaml file.

3. Start Cassandra

sudo ./bin/cassandra -f

That’s it!!