Cassandra#
Just some free format stuff for a small studying / experiment with NoSQL stuff.
Resources#
- C* 2012: Building a Cassandra Based Application from Scratch (Patrick McFadin, Hobsons)
- Introduction to NoSQL by Martin Fowler
- http://cassandra.apache.org/
Install/config#
lxc#
- /etc/default/lxc => change subnet from 10.0.3 to 10.0.4 (10.0.3 is already in use somewhere else)
- add static route in wireless router (10.0.4.0/8 => via 10.0.0.164)
- adjust /etc/network/interfaces of container to:
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 10.0.4.10
netmask 255.255.255.0
network 10.0.4.0
broadcast 10.0.4.255
gateway 10.0.4.1
post-up route add default gw 10.0.4.1 dev eth0
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 213.197.28.3 213.197.30.28
dns-search computerhok.nl
- lxc-host ubuntu1 => 10.0.4.10
cassandra#
- useradd cssndra && mkdir /home/cssndra && chown -R cssndra /home/cssndra + change /etc/passwd => sh => bash
- wget 'http://mirrors.supportex.net/apache/cassandra/1.2.4/apache-cassandra-1.2.4-bin.tar.gz'
- apt-get install openjdk-7-jdk
- sudo mkdir /opt/apache-cassandra-1.2.4 && sudo chown cssndra /opt/apache-cassandra-1.2.4 && sudo ln -s /opt/apache-cassandra-1.2.4 /opt/cassandra
- cssndra@ubuntu1:~$ cd /opt && tar -xf ~/apache-cassandra-1.2.4-bin.tar
- ls -l
cssndra@ubuntu1:/opt/cassandra$ ls -l total 248 -rw-r--r-- 1 cssndra cssndra 152928 Apr 8 19:21 CHANGES.txt -rw-r--r-- 1 cssndra cssndra 11609 Apr 8 19:21 LICENSE.txt -rw-r--r-- 1 cssndra cssndra 47580 Apr 8 19:21 NEWS.txt -rw-r--r-- 1 cssndra cssndra 1820 Apr 8 19:21 NOTICE.txt -rw-r--r-- 1 cssndra cssndra 3569 Apr 8 19:21 README.txt drwxr-xr-x 2 cssndra cssndra 4096 May 15 21:43 bin drwxr-xr-x 2 cssndra cssndra 4096 May 15 21:43 conf drwxr-xr-x 2 cssndra cssndra 4096 May 15 21:43 interface drwxr-xr-x 4 cssndra cssndra 4096 May 15 21:43 javadoc drwxr-xr-x 3 cssndra cssndra 4096 May 15 21:43 lib drwxr-xr-x 3 cssndra cssndra 4096 May 15 21:43 pylib drwxr-xr-x 4 cssndra cssndra 4096 Apr 8 19:21 tools
- sudo mkdir -p /var/lib/cassandra/data /var/lib/cassandra/commitlog && sudo chown -R cssndra /var/lib/cassandra
- sudo mkdir /var/log/cassandra/ && sudo chown -R cssndra /var/log/cassandra
- limit the heap size usage by editing conf/cassandra-env.sh : MAX_HEAP_SIZE="512M" HEAP_NEWSIZE="100M"
- ==> now first clone the VM : lxc-clone -o ubuntu1 -n ubuntu2
- start the thing with : ./bin/cassandra -f
- add keyspace:
