可以自己从官网编译打包也可以直接下载官网的.gz包。自己编译打包的过程如下:
1、查看是否安装cmake、svn、openssl、ncurses,没有的直接安装上 yum list|grep cmake yum list |grep ncurses yum install -y ncurses.i386 ncurses-devel.i386 yum list |grep openssl yum install -y openssl-devel.i386 2、安装apache-maven tar xf ~/apache-maven-3.2.1-bin.tar.gz . tar xf ~/apache-maven-3.2.1-bin.tar.gz -C /usr/local/ ln -sv apache-maven-3.2.1 maven 设置maven home和添加maven bin到path环境变量 编辑/etc/profile文件即可 3、安装protobuf tar xf protobuf-2.5.0.tar.gz 1005 cd protobuf-2.5.0 1006 ll 1007 ./configure 1008 make && make install 3、check out hadoop2.x svn checkout http://svn.apache.org/repos/asf/hadoop/common/tags/release-2.4.0 cd release-2.4.0/ 4、编译打包 mvn package -Pdist,native -DskipTests -Dtar 5、解压编译后的tar包 cd hadoop-dist/target cp hadoop-2.4.0.tar.gz /usr/local cd /usr/local/ tar xf hadoop-2.4.0.tar.gz ln hadoop-2.4.0 hadoop -sv 6、编辑hadoop的环境变量
打完包之后的安装参考下面的文章即可
http://bigdatahandler.com/hadoop-hdfs/installing-single-node-hadoop-2-2-0-on-ubuntu/