在安装hadoop的时候,要设置一些环境变量,下面是只要把下面的脚本复制到~/.bashrc中就可以了
export JAVA_HOME=/home/shgong/jdk export HADOOP_INSTALL=/home/shgong/hadoop export HBASE_HOME=/home/shgong/hbase export HIVE_INSTALL=/home/shgong/hive export SQOOP_HOME=/home/shgong/sqoop export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_INSTALL/bin:$HBASE_HOME/bin:$HIVE_INSTALL/bin:$SQOOP_HOME/bin
注意,上面我设置了一些链接文件,这是一些很好的做法,以后要升级hadoop的版本,只要改一下符号链接就可以了