Database Reference
In-Depth Information
1. Set up Bash shell file for hadoop $HOME/.bashrc
When logged in as hadoop, you add the following text to the end of the file $HOME/.bashrc. When you create this
Bash shell, environmental variables like JAVA_HOME and HADOOP_PREFIX are set. The next time a Bash shell is created
by the hadoop user account, these variables will be pre-defined.
#######################################################
# Set Hadoop related env variables
export HADOOP_PREFIX=/usr/local/hadoop
# set JAVA_HOME (we will also set a hadoop specific value later)
export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk
# some handy aliases and functions
unalias fs 2>/dev/null
alias fs="hadoop fs"
unalias hls 2>/dev/null
alias hls="fs -l"
# add hadoop to the path
export PATH=$PATH:$HADOOP_PREFIX
export PATH=$PATH:$HADOOP_PREFIX/bin
export PATH=$PATH:$HADOOP_PREFIX/sbin
Note that you are not using the $HADOOP_HOME variable, because with this release it has been superseded. If you
use it instead of $HADOOP_PREFIX , you will receive warnings.
2. Set up conf/hadoop-env.sh
You now modify the configuration file hadoop-env.sh to specify the location of the Java installation by setting the
JAVA_HOME variable. In the file conf/hadoop-env.sh, you change:
# export JAVA_HOME=/usr/lib/j2sdk1.5-sun
to
export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk
Note: When referring to the Hadoop installation configuration directory in this section, and all subsequent
sections for the V1 installation, I mean the /usr/local/hadoop/conf directory.
 
Search WWH ::




Custom Search