Database Reference
In-Depth Information
Installation
Start by deciding which user you'd like to run Hadoop as. For trying out Hadoop or devel-
oping Hadoop programs, you can run Hadoop on a single machine using your own user ac-
count.
Download a stable release, which is packaged as a gzipped tar file, from the Apache Ha-
doop releases page , and unpack it somewhere on your filesystem:
% tar xzf hadoop- x.y.z .tar.gz
Before you can run Hadoop, you need to tell it where Java is located on your system. If you
have the JAVA_HOME environment variable set to point to a suitable Java installation, that
will be used, and you don't have to configure anything further. (It is often set in a shell star-
tup file, such as ~/.bash_profile or ~/.bashrc .) Otherwise, you can set the Java installation
that Hadoop uses by editing conf/hadoop-env.sh and specifying the JAVA_HOME variable.
For example, on my Mac, I changed the line to read:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/
Contents/Home
to point to the installed version of Java.
It's very convenient to create an environment variable that points to the Hadoop installation
directory ( HADOOP_HOME , by convention) and to put the Hadoop binary directories on
your command-line path. For example:
% export HADOOP_HOME=~/sw/hadoop- x.y.z
% export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
Note that the sbin directory contains the scripts for running Hadoop daemons, so it should
be included if you plan to run the daemons on your local machine.
Check that Hadoop runs by typing:
% hadoop version
Hadoop 2.5.1
Subversion https://git-wip-us.apache.org/repos/asf/hadoop.git -r
2e18d179e4a8065
b6a9f29cf2de9451891265cce
Compiled by jenkins on 2014-09-05T23:11Z
Compiled with protoc 2.5.0
From source with checksum 6424fcab95bfff8337780a181ad7c78
This command was run using /Users/tom/sw/hadoop-2.5.1/share/hadoop/
common/hadoop
-common-2.5.1.jar
Search WWH ::




Custom Search