hadoop安装计 大体上按这个做就好了 http://blog.csdn.net/hitwengqi/article/details/8008203 需要修改hadoop-env.sh export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64 export PATH=$PATH:/usr/local/hadoop/bin rm -r ~/playground/classes/* #删除编译后的文件 rm ~/playground/wordcount.jar #删除jar包 rm -r ~/output #删除wordcount产生的文档 #编译WordCount.java javac -classpath /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.2.0.jar:/usr/local/hadoop/share/hadoop/common/hadoop-common-2.2.0.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-cli-1.2.jar -d ~/playground/classes ~/playground/src/WordCount.java #jar打包 # -C切换目录 jar -cvf ~/playground/wordcount.jar -C ~/playground/classes/ . #hadoop执行命令 hadoop jar ~/playground/wordcount.jar home.goodspeed.playground.classes.org.apache.hadoop.WordCount ~/input ~/output
原文:http://www.cnblogs.com/goodspeed/p/3748444.html