到官网下载hadoop-0.20.203.0.tar.gz
[cuijj@station1 ~]$ tar xzvf hadoop-0.20.2.tar.gz
把Hadoop的安装路径添加到/etc/profile中
export HADOOP_INSTALL=/usr/local/hadoop-0.20.203.0
export PATH=$PATH:$HADOOP_INSTALL/bin
为了让/etc/profile生效,source一下
[cuijj@station1 ~]$ source /etc/profile
配置hadoop
hadoop的配置文件在/conf目录下
1)配置Java环境
[cuijj@station1 ~]$ vim hadoop-0.20.2/conf/hadoop-env.sh
# export JAVA_HOME=/usr/lib/j2sdk1.5-sun
改为:
export CLASSPATH=/usr/java/jdk1.7.0_02lib