In order to run the examples you need a working Hadoop installation and JDK 1.6+ installed on the machine that runs the samples.
For instructions on installing Hadoop refer to your distribution documentation or you can refer to the Getting Started section of this for instructions based off the Apache download distribution.