Just a quick post on how-to install cassandra on Centos 5, and getting the required bits on to stop all the errors you will see, such as JNA and MX4J missing.
First you need to get all the required modules from yum, to prepare the server.
yum -y install gcc-c++ make cmake python-devel bzip2-devel zlib-devel
yum -y install log4cpp-devel git git-core cronolog google-perftools-devel
yum -y install readline-devel ncurses-devel libtool autoconf expat
yum -y install libevent-devel flex byacc expat-devel
# Perl Modules for Thrift Install
yum -y install perl-Bit-Vector perl-Class-Accessor
# Java Install
yum -y remove jpackage-utils
wget http://dev.centos.org/centos/5/testing/x86_64/RPMS/jpackage-utils-1.7.5-1jpp.1.el5.centos.noarch.rpm
rpm -ivh jpackage-utils-1.7.5-1jpp.1.el5.centos.noarch.rpm
yum -y install xml-commons-apis xml-commons-apis-javadoc ant
yum -y install java
yum -y install log4j jakarta-commons-logging jakarta-commons-lang
yum -y install java-1.4.2-gcj-compat java-1.4.2-gcj-compat-devel
Next you will want to download the latest version of cassandra available at http://cassandra.apache.org/download/
I have chosen to install cassandra in the following location: /usr/local/share/cassandra
wget http://mirror.ox.ac.uk/sites/rsync.apache.org//cassandra/0.8.4/apache-cassandra-0.8.4-bin.tar.gz
tar -xvf apache-cassandra-0.8.4-bin.tar.gz
mkdir /usr/local/share/cassandra/
cp ~/apache-cassandra-0.8.4/* /usr/local/share/cassandra -R -f;
cd /usr/local/share/cassandra
Installing JNA is done as follows:
wget “https://github.com/twall/jna/raw/3.3.0/jnalib/dist/jna.jar” –no-check-certificate -O /usr/local/share/cassandra/lib/jna.jar
chmod 755 /usr/local/share/cassandra/lib/jna.jar
MX4J is installed with:
wget “http://downloads.sourceforge.net/project/mx4j/MX4J%20Binary/3.0.2/mx4j-3.0.2.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmx4j%2Ffiles%2FMX4J%2520Binary%2F3.0.2%2F&ts=1314263784&use_mirror=freefr”
tar zxvf mx4j-3.0.2.tar.gz mx4j-3.0.2/lib/mx4j-tools.jar
cp mx4j-3.0.2/lib/mx4j-tools.jar /usr/local/share/cassandra/lib/
chmod 755 /usr/local/share/cassandra/lib/mx4j-tools.jar
Switching to Sun Java
You will need to download the latest JDK from SUN, and can switch from OpenJDK with the following
rpm /root/jdk-7-linux-x64.rpm -ivh
/usr/sbin/alternatives –install /usr/bin/java java /usr/java/jdk1.7.0/bin/java 2 && /usr/sbin/alternatives –config java
Just enter the number of the new JDK in the selection above, and hit enter (on a fresh install, its usually #3)
Finishing up.
After you have everything above done, you should just be able to edit the config file /usr/local/share/cassandra/conf/cassandra.yaml, and then run cassandra /usr/local/share/cassandra/bin/cassandra
If you are running a cluster setup with cassandra, you can use a token calculator such as http://blog.milford.io/cassandra-token-calculator/ which will evenly spread the data across your nodes.
Also be sure to set your commit log and data directory on different disks.
The best option I have found is having the commitlog and OS on an SSD drive, and the data stored on a Raid 0 disk array with SAS drives. You want to make sure you have at least double the space available on disk as what you will be consuming with your nodes.
Over the past few days I have been playing about with my Sky Boxes at home, and found a few hidden secrets around. This post is just to combine the bits I have found.
Forcing An Upgrade
After a few months of having a HD box still running on the old EPG (electronic program guide) , I decided to find a way to force the system to update to the latest version.
You can do this by:
Power off the box at mains
Hold down back up buttom on front of box
Power back on at mains
When download message appears on screen, let go of back up button.
This will usually take around 10 minutes, but once the box comes back, you should have the latest software for your box
Sky Installers Menu
The Sky installers menu allows you to change extra settings on your Sky box, but be careful, changing settings in here can cause your box to stop working.
On the original sky epg, you can access this menu by pressing the following keys on your sky remote in order.
SERVICES
4
0
1
SELECT
More information can be found about the options here: http://www.digitalsat.co.uk/skyinstallersmenu.html
To access the menu on a sky HD box, you need to press the following keys in order:
SERVICES
0
0
1
SELECT
So, I just downloaded the new Opera, and ran a JavaScript speed check, and was amazed how their new engines compare to the other browsers around. It also supports Windows 7 taskbar highlights properly
The test I ran was on http://www2.webkit.org/perf/sunspider-0.9/sunspider-driver.html and here are the results
Opera 10.50
============================================
RESULTS (means and 95% confidence intervals)
——————————————–
Total: 388.6ms +/- 2.3%
——————————————–
Chrome 4.0.249
============================================
RESULTS (means and 95% confidence intervals)
——————————————–
Total: 556.2ms +/- 3.1%
——————————————–
Firefox 3.5.8
============================================
RESULTS (means and 95% confidence intervals)
——————————————–
Total: 1155.4ms +/- 1.6%
——————————————–
Internet Explorer 8
============================================
RESULTS (means and 95% confidence intervals)
——————————————–
Total: 5145.4ms +/- 0.6%
——————————————–
About 20 minutes ago I got my invite to google wave. I now have my account live (brooke@wavesandbox.com) as well as my secondary account (brooke-test@wavesandbox.com), so I can start testing out the wave. I haven’t had any time to get into it and play, but here is a screenshot of an empty preview account
Update:
After about 20 minutes, everyone started using wave and this is what it looks like
Update 2:
When I tried to reply to a wave that was created after I first loaded the page.
If you know me, you will know I hate Mac’s. However, the day has finally arrived where I decided to take a risk and go to buy one for myself. Not being a strong follower of the Apple movement, I purchased my MacBook Pro on sunday 7th June. I got home, installed some apps (dragging an icon around the screen seemed to be how you install an app), and started to get used to the interface. All was great until the afternoon on Monday. I had James, the designer @ Just Develop It send me a text message telling me Apple dropped the price of the MacBook Range and also upgraded all of the hardware… Gutted.
I called the Apple Store straight away, and they said it would be fine to just bring it back and get a new one when it came in stock. Yesterday it arrived at the store so I went down and exchanged my old MacBook Pro for a nice shiny new one. They even gave me money back. Money Back for an upgrade? Are they mad. I dont know how I have gone from hating apple, to loving them within the space of a week, and also now being the owner of my second apple.

I have to admit, Apple products are Very well designed, even the packaging is amazing. I hope that my previous view on Mac Users was wrong, because I dont want to trade productivity for a good looking laptop. Setup was fairly painless with nearly everything being done for me, and I just had to go into the settings to tweak the system to act more like windows. Working out all the short cut keys didnt take long (apart from Home & End, which I later found to just be cmd + the arrow keys) . I have enabled the ‘right’ mouse button (bottom right of the trackpad) and am loving Expose and Spaces. The only problem I have faced so far is the mouse guestures in Opera, but then what do you expect from a trackpad
Without having the full expierence of a Mac yet, im going to hold of saying any more unless it turns out to be a nightmare
It has now reached the stage where I am logging into 20 – 40 different servers a day, which itself is quite time consuming when you know the server logins stored in your head. However, all our servers have different access passwords and finding each server password takes a little too long (there is no way I could remember all our server logins).
There is a great feature on UNIX machines which will allow you to simply ssh into a server without the password as long as you have configured each machine.
The setup of this is pretty quick, there are only 3 main things you need to remember.
1. Generate the Key on the client box
2. Copy the Key into your clipboard from the client box
3. Enter the Key into the server box from your clipboard
Stage 1: Generating the Key
ssh-keygen -t dsa
By running the above command, you will generate your client key. You will be faced with a few questions, you should just be able to press enter with no answer on each question.
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Stage 2: Access the Key
You will need to access the key that was just generated to place on your server so you can quickly access it. First things first, you need to get the key onto the screen or into your email. I would recommend using the screen output to avoid any formatting errors by your mail client.
Outputting onto the screen:
cat ~/.ssh/id_dsa.pub
Sending the output to your email:
cat ~/.ssh/id_dsa.pub | mail email@domain.com
Stage 3: Storing the Key on the Server
Now you have the key, you just need to add it onto the server you are going to be SSH’ing into.
Open up the file ‘~/.ssh/authorized_keys’ using your preferred editor. I usually use nano, so:
nano ~/.ssh/authorized_keys
Then copy the key into the end of the file. You need to ensure that the key stays on one line and you have one key per line.
Once you have saved the authorized_keys file, you should be able to hop back onto the client box and just type
ssh root@hostname
and you will be logged straight into shell on the ‘hostname’ box.
And thats all you need to do
This has saved me soo much time on a day to day basis and probably given me an extra 30 mins > 1 hour a day to get some real work done.
So, its only a few hours away from the timestamp 1234567890 and we just went past 1234543210. As always, sad enough to take a photo (well, Jordan (www.oxcreative.com) took the photo) on a monitor in our office which is displaying www.coolepochcountdown.com. Its only 6 or so hours till all hell breaks out and the time starts going backwards (or we just see a nice timestamp come and go).

A few weeks back Jordan (designer @ Just Develop It) brought in his rubiks cube into the office and we were all amazed that he could complete the cube. The fact he could do it in under 5 minutes just added to the amazement. Between writing code and sleeping, Rich and myself found ourselves trying to solve the cube wondering what logic we could apply to come to a solution. After about a week not being able to complete more than the first 2 layers I cracked and looked around youtube.com for a way to complete the cube.
Much to my suprise, there was a logical way to solve the cube based on a few algorithms. Easy when you know how
So, the youtube video I found was by pogobat and made the cube easy to understand. You can see the video here: http://uk.youtube.com/watch?v=HsQIoPyfQzM. The algorithms for the cube are as follows:
- Fi U Li Ui
- Ri Di R D
- U R Ui Ri Ui Fi U F
- Ui Li U L U F Ui Fi
- F R U Ri Ui Fi
- R U Ri U R U U Ri
- U R Ui Li U Ri Ui L
- Ri Di R D
Ok, the letters above dont mean very much unless you can watched the video. You always need to hold the cube in the same position for any of this to work
F = The face closest to you (Front)
U = The face on the top (Up)
L = The face in your left hand (Left)
R = The face in your right hand (Right)
D = The face on the bottom of the cube (Down)
There is also i. This stands for ‘inverted’ or ‘counter clockwise’
If you see Ri, you should turn the right face counter clockwise. Should you see R you should turn the right face clockwise. Be sure to only move that one face and not rotate the cube, else it will all end in disaster
Once I got to grips with the algorithms, everything slotted into place and I could complete the cube serveral times in one night. Its a very impressive skill to learn.
Get yourself onto youtube.com and watch the video linked above and learn the cube for yourself














