hadoop2.4.1在64位Deepin/Ubuntu系统中编译安装

  • Post author:
  • Post category:其他


Requirements:

* Unix System

* JDK 1.6+

* Maven 3.0 or later

* Findbugs 1.3.9 (if running findbugs)

* ProtocolBuffer 2.5.0

* CMake 2.6 or newer (if compiling native code)

* Internet connection for first build (to fetch all Maven and Hadoop dependencies)

这是源码中给出的要求,给出我的环境

1. Deepin 2014 64位

2.安装gcc,g++,

cmake

,

pkg-config,




libssl-dev

【替换yum系列的



openssl-devel



】,



libncurses5-dev



【替换yum系列的

ncurses-devel








(apt-get install 完成)

3.下载.tar.gz包解压

【Ant => apache-ant-1.9.4-bin.tar.gz 】

【maven => apache-maven-3.2.2-bin.tar.gz】

【Findbugs => findbugs-3.0.0.tar.gz 】

【ProtocolBuffer => protobuf-2.5.0.tar.gz】

并在.bashrc中配置环境

#set ant path

export ANT_HOME=/home/hadoop/apache-ant-1.9.4

export PATH=$ANT_HOME/bin:$PATH

#set maven path

export M2_HOME=/home/hadoop/apache-maven-3.2.2

export PATH=$M2_HOME/bin:$PATH

#set protoc path

export PROTOC_HOME=/home/hadoop/protoc

export PATH=$PROTOC_HOME/bin:$PATH

#set findbugs path

export FINDBUGS_HOME=/home/hadoop/findbugs-3.0.0

export PATH=$FINDBUGS_HOME/bin:$PATH

4. mvn的国内镜像配置参照

http://blog.csdn.net/w13770269691/article/details/16883663

5.进入hadoop-2.4.1-src目录

mvn clean install -DskipTests

mvn package -Pdist,native -DskipTests -Dtar -e

6.在 hadoop-2.4.1-src/hadoop-dist/target目录下有hadoop-2.4.1.tar.gz 以及hadoop-2.4.1文件夹等,成功。。。

成功结果如下:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Hadoop Main ................................. SUCCESS [ 19.466 s]
[INFO] Apache Hadoop Project POM .......................... SUCCESS [01:11 min]
[INFO] Apache Hadoop Annotations .......................... SUCCESS [  3.271 s]
[INFO] Apache Hadoop Assemblies ........................... SUCCESS [  0.331 s]
[INFO] Apache Hadoop Project Dist POM ..................... SUCCESS [ 48.170 s]
[INFO] Apache Hadoop Maven Plugins ........................ SUCCESS [  3.892 s]
[INFO] Apache Hadoop MiniKDC .............................. SUCCESS [  2.780 s]
[INFO] Apache Hadoop Auth ................................. SUCCESS [  5.163 s]
[INFO] Apache Hadoop Auth Examples ........................ SUCCESS [  2.596 s]
[INFO] Apache Hadoop Common ............................... SUCCESS [02:25 min]
[INFO] Apache Hadoop NFS .................................. SUCCESS [  6.238 s]
[INFO] Apache Hadoop Common Project ....................... SUCCESS [  0.049 s]
[INFO] Apache Hadoop HDFS ................................. SUCCESS [03:26 min]
[INFO] Apache Hadoop HttpFS ............................... SUCCESS [ 40.060 s]
[INFO] Apache Hadoop HDFS BookKeeper Journal .............. SUCCESS [ 18.586 s]
[INFO] Apache Hadoop HDFS-NFS ............................. SUCCESS [  5.521 s]
[INFO] Apache Hadoop HDFS Project ......................... SUCCESS [  0.042 s]
[INFO] hadoop-yarn ........................................ SUCCESS [  0.039 s]
[INFO] hadoop-yarn-api .................................... SUCCESS [01:24 min]
[INFO] hadoop-yarn-common ................................. SUCCESS [ 35.123 s]
[INFO] hadoop-yarn-server ................................. SUCCESS [  0.038 s]
[INFO] hadoop-yarn-server-common .......................... SUCCESS [ 12.209 s]
[INFO] hadoop-yarn-server-nodemanager ..................... SUCCESS [ 22.370 s]
[INFO] hadoop-yarn-server-web-proxy ....................... SUCCESS [  4.176 s]
[INFO] hadoop-yarn-server-applicationhistoryservice ....... SUCCESS [  6.610 s]
[INFO] hadoop-yarn-server-resourcemanager ................. SUCCESS [ 16.262 s]
[INFO] hadoop-yarn-server-tests ........................... SUCCESS [  1.630 s]
[INFO] hadoop-yarn-client ................................. SUCCESS [  6.959 s]
[INFO] hadoop-yarn-applications ........................... SUCCESS [  0.038 s]
[INFO] hadoop-yarn-applications-distributedshell .......... SUCCESS [  3.033 s]
[INFO] hadoop-yarn-applications-unmanaged-am-launcher ..... SUCCESS [  2.621 s]
[INFO] hadoop-yarn-site ................................... SUCCESS [  0.044 s]
[INFO] hadoop-yarn-project ................................ SUCCESS [  7.614 s]
[INFO] hadoop-mapreduce-client ............................ SUCCESS [  0.065 s]
[INFO] hadoop-mapreduce-client-core ....................... SUCCESS [ 25.161 s]
[INFO] hadoop-mapreduce-client-common ..................... SUCCESS [ 20.289 s]
[INFO] hadoop-mapreduce-client-shuffle .................... SUCCESS [  5.323 s]
[INFO] hadoop-mapreduce-client-app ........................ SUCCESS [ 18.039 s]
[INFO] hadoop-mapreduce-client-hs ......................... SUCCESS [ 13.137 s]
[INFO] hadoop-mapreduce-client-jobclient .................. SUCCESS [ 22.378 s]
[INFO] hadoop-mapreduce-client-hs-plugins ................. SUCCESS [  4.398 s]
[INFO] Apache Hadoop MapReduce Examples ................... SUCCESS [  7.833 s]
[INFO] hadoop-mapreduce ................................... SUCCESS [  6.540 s]
[INFO] Apache Hadoop MapReduce Streaming .................. SUCCESS [  7.204 s]
[INFO] Apache Hadoop Distributed Copy ..................... SUCCESS [ 12.981 s]
[INFO] Apache Hadoop Archives ............................. SUCCESS [  3.181 s]
[INFO] Apache Hadoop Rumen ................................ SUCCESS [  8.828 s]
[INFO] Apache Hadoop Gridmix .............................. SUCCESS [  5.883 s]
[INFO] Apache Hadoop Data Join ............................ SUCCESS [  2.975 s]
[INFO] Apache Hadoop Extras ............................... SUCCESS [  4.564 s]
[INFO] Apache Hadoop Pipes ................................ SUCCESS [ 15.377 s]
[INFO] Apache Hadoop OpenStack support .................... SUCCESS [  7.918 s]
[INFO] Apache Hadoop Client ............................... SUCCESS [  8.190 s]
[INFO] Apache Hadoop Mini-Cluster ......................... SUCCESS [  1.087 s]
[INFO] Apache Hadoop Scheduler Load Simulator ............. SUCCESS [  6.014 s]
[INFO] Apache Hadoop Tools Dist ........................... SUCCESS [  8.866 s]
[INFO] Apache Hadoop Tools ................................ SUCCESS [  0.033 s]
[INFO] Apache Hadoop Distribution ......................... SUCCESS [ 34.660 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17:16 min
[INFO] Finished at: 2014-07-12T16:23:05+08:00
[INFO] Final Memory: 76M/361M
[INFO] ------------------------------------------------------------------------



版权声明:本文为zhuqi12580原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。