Build Hadoop 2.6.0 on CentOS 64-bit

Source: Internet
Author: User
Tags hadoop mapreduce

1. Operating system compilation Environment
Yum install cmake lzo-devel zlib-devel gcc gcc-c++ autoconf automake libtool ncurses-devel openssl-devel libxtst
2. Installing the JDK
Download JDK1.7, note You can only use 1.7, or compile error http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Tar zxvf jdk-7u75-linux-x64.tar.gz-c/app
Export Java_home=/app/jdk1.7.0_75export jre_home= $JAVA _home/jreexport classpath=.: $JAVA _home/lib/dt.jar: $JAVA _ Home/lib/tools.jar
Path= $PATH: $JAVA _home/bin
3. Installing PROTOBUF

Download protobuf-2.5.0, cannot use high version, otherwise Hadoop compilation cannot pass
wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz

Tar xvf protobuf-2.5.0.tar.gz
CD protobuf-2.5.0
./configure
Make
Make install
Ldconfig

Protoc--version
4. Install Ant

wget http://mirror.bit.edu.cn/apache/ant/binaries/apache-ant-1.9.4-bin.tar.gz
Tar zxvf apache-ant-1.9.4-bin.tar.gz-c/app
Vim/etc/profile
Export ant_home=/app/apache-ant-1.9.4path= $PATH: $ANT _home/bin
5. Install Maven
wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.3.1/binaries/apache-maven-3.3.1-bin.tar.gz

Tar zxvf apache-maven-3.3.1-bin.tar.gz-c/app

Vim/etc/profile
Export maven_home=/app/apache-maven-3.3.1
Export path= $PATH: $MAVEN _home/bin

Modifying a configuration file
Vi/usr/local/apache-maven-3.0.5/conf/settings.xml

To change the MAVEN repository, add the following to <mirrors></mirros>:

<mirror>
<id>nexus-osc</id>
<mirrorOf>*</mirrorOf>
<name>Nexusosc</name>
<url>http://maven.oschina.net/content/groups/public/</url>
</mirror>
New additions within <profiles></profiles>
<profile>
<id>jdk-1.7</id>
<activation>
<jdk>1.7</jdk>
</activation>
<repositories>
<repository>
<id>nexus</id>
<name>local Private nexus</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>local Private nexus</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
6. Installationfindbugs (not required)
wget http://prdownloads.sourceforge.net/findbugs/findbugs-3.0.1.tar.gz?download
tar zxvf findbugs-3.0.1.tar.gz-c/app
Vim/etc/profile
Export findbugs_home=/app/findbugs-3.0.1path= $PATH: $FINDBUGS _home/binexport PATH
7. Compiling Hadoop2.6.0
wgetHttp://mirror.bit.edu.cn/apache/hadoop/core/hadoop-2.6.0/hadoop-2.6.0-src.tar.gzCD HADOOP-2.6.0-SRC
MVN Package-dskiptests-pdist,native-dtar

[info] Reactor Summary: [INFO] [INFO] Apache Hadoop Main ......... ................ SUCCESS [ 4.401 s][info] Apache Hadoop Project POM ......... ......... SUCCESS [ 3.864 s][info] Apache Hadoop Annotations ......... ......... SUCCESS [ 7.591 s][info] Apache Hadoop assemblies ................. SUCCESS [ 0.535 s][info] Apache Hadoop Project Dist POM ............ SUCCESS [ 3.585 s][info] Apache Hadoop Maven Plugins .............. SUCCESS [ 6.623 s][info] Apache Hadoop minikdc ......... ............. SUCCESS [ 4.722 s][info] Apache Hadoop Auth ..... ..... ............... SUCCESS [ 7.787 s][info] Apache Hadoop Auth Examples .............. SUCCESS [ 5.500 s][info] Apache Hadoop Common ......... .............. SUCCESS [02:47 min][info] Apache Hadoop NFS ...... ..... ............... SUCCESS [12.793 s][info] Apache Hadoop KMS ....... ..... .............. SUCCESS [20.443 s][INFO] Apache Hadoop Common Project ......... ....... SUCCESS [ 0.111 s][info] Apache Hadoop HDFS ..... ..... ............... SUCCESS [04:35 min][info] Apache Hadoop httpfs ......... .............. SUCCESS [29.896 s][info] Apache Hadoop HDFS bookkeeper Journal ...... SUCCESS [11.100 s][info] Apache Hadoop hdfs-nfs ......... ............ SUCCESS [ 8.262 s][info] Apache Hadoop HDFS Project ......... ........ SUCCESS [ 0.069 s][info] hadoop-yarn ..... ........ ................... SUCCESS [ 0.066 s][info] hadoop-yarn-api ..... ..... .................. SUCCESS [02:05 min][info] Hadoop-yarn-common ......... ................ SUCCESS [46.132 s][info] hadoop-yarn-server ......... ................ SUCCESS [ 0.123 s][info] Hadoop-yarn-server-common ......... .......... SUCCESS [19.166 s][info] hadoop-yarn-server-nodemanager ............. SUCCESS [25.552 S][info] Hadoop-yarn-server-weB-proxy ........ ......... SUCCESS [ 5.456 s][info] hadoop-yarn-server-applicationhistoryservice .... SUCCESS [11.781 s][info] hadoop-yarn-server-resourcemanager ....... ..... SUCCESS [30.557 s][info] hadoop-yarn-server-tests ......... .......... SUCCESS [ 9.765 s][info] hadoop-yarn-client ......... ................ SUCCESS [14.016 s][info] hadoop-yarn-applications ......... .......... SUCCESS [ 0.101 s][info] Hadoop-yarn-applications-distributedshell .... SUCCESS [ 4.116 s][info] hadoop-yarn-applications-unmanaged-am-launcher ..... SUCCESS [ 2.993 s][info] hadoop-yarn-site ..... ..... ................. SUCCESS [ 0.093 s][info] hadoop-yarn-registry ......... .............. SUCCESS [ 9.036 s][info] hadoop-yarn-project ......... ............... SUCCESS [ 6.557 s][info] hadoop-mapreduce-client ......... ........... SUCCESS [ 0.267 S][info] Hadoop-mapreduce-client-core ....................... SUCCESS [36.775 s][info] Hadoop-mapreduce-client-common ............. SUCCESS [28.049 s][info] hadoop-mapreduce-client-shuffle ......... ..... SUCCESS [ 7.285 s][info] hadoop-mapreduce-client-app ............... SUCCESS [17.333 s][info] hadoop-mapreduce-client-hs ......... ......... SUCCESS [15.283 s][info] hadoop-mapreduce-client-jobclient ....... ..... SUCCESS [ 7.110 s][info] hadoop-mapreduce-client-hs-plugins ....... ..... SUCCESS [ 3.843 s][info] Apache Hadoop MapReduce Examples ........ ..... SUCCESS [12.559 s][info] hadoop-mapreduce ..... ..... ................. SUCCESS [ 6.331 s][info] Apache Hadoop MapReduce streaming ....... ..... SUCCESS [45.863 S][info] Apache Hadoop distributed Copy ............ SUCCESS [46.304 s][info] Apache Hadoop Archives ......... ............ SUCCESS [ 3.575 s][info] Apache Hadoop rumen ........ ............... Success [12.991 s][info] Apache Hadoop gridmix ......... ............. SUCCESS [10.105 s][info] Apache Hadoop Data Join ......... ........... SUCCESS [ 5.021 s][info] Apache Hadoop Ant Tasks ......... ........... SUCCESS [ 3.804 s][info] Apache Hadoop Extras ......... .............. SUCCESS [ 5.298 s][info] Apache Hadoop Pipes ........ ............... SUCCESS [10.290 s][info] Apache Hadoop OpenStack support ........ ..... SUCCESS [ 9.220 s][info] Apache Hadoop Amazon Web Services support .... SUCCESS [11:12 min][info] Apache Hadoop Client ......... .............. SUCCESS [10.714 s][info] Apache Hadoop mini-cluster ............... SUCCESS [ 0.143 s][info] Apache Hadoop Scheduler Load Simulator ...... SUCCESS [ 7.664 s][info] Apache Hadoop Tools Dist ......... .......... SUCCESS [29.970 s][info] Apache Hadoop Tools ..... ..... ............... SUCCESS [ 0.057 S][INFO] Apache Hadoop distribution ......... .......... SUCCESS [49.425 s][info]------------------------------------------------------------------------[INFO] BUILD Success[info]------------------------------------------------------------------------[INFO] Total time:32:26 min[ INFO] finished at:2015-03-19t19:56:40+08:00[info] Final Memory:99m/298m[info]------------------------------------- -----------------------------------
Successful compilation will be packaged and placed in hadoop-dist/target# lsantrun dist-tar-stitching.sh hadoop-2.6.0.tar.gz hadoop-dist-2.6.0         -javadoc.jar maven-archiverdist-layout-stitching.sh hadoop-2.6.0 Hadoop-dist-2.6.0.jar javadoc-bundle-options Test-dir

Build Hadoop 2.6.0 on CentOS 64-bit

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.