Each software version:
java:1.7.0_79
Hadoop: hadoop-2.6.5-src.tar.gz
maven:3.3.9
protocbuf:2.5
Decompression TAR-ZXVF
1 Configuring MAVEN Environment variables
Export maven_home=/root/compilehadoop/maven-3.3.9
Export path= $PATH: $MAVEN _home/bin
SOURCE ~/.bash_profile
Check to see if MAVEN is installed successfully
Mvn-version
[Root@bigdatahadoop protobuf-2.5.0]# Mvn-version Apache Maven 3.3.9 (BB52D8502B132EC0A5A3F4C09453C07478323DC5; 2015-11-11t00:41:47+08:00) Maven Home:/root/compilehadoop/maven-3.3.9 Java version:1.7.0_79, Vendor:oracle Corporation Java Home:/usr/java/jdk1.7.0_79/jre Default Locale:en_us, Platform Encoding:utf-8 OS name: "Linux", Version: "2.6.32-431.el6.x86_64", Arch: "AMD64", Family: "Unix" |
2 Compile installation Protobuf Configure can specify installation path
①CD protobuf-2.5.0
②./configure
③make
④make Install
Detect Protoc–version
[Root@bigdatahadoop protobuf-2.5.0]# Protoc--version
Libprotoc 2.5.0
Need check and install
Yum Install gcc-c++
3 readiness is ready, now start compiling (refer to the BUILDING.txt file under src for more compilation conditions)
CD HADOOP-2.6.5-SRC
MVN Clean Package-pdist,native-dskiptests-dtar
--------------------------------
Error
1
[INFO] Build failure
[INFO]------------------------------------------------------------------------
[INFO] Total time:07:39 min
[INFO] Finished at:2016-10-12t21:50:39+08:00
[INFO] Final memory:36m/87m
[INFO]------------------------------------------------------------------------
[ERROR] Unknown lifecycle Phase "–pdist,native". Must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id >:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle Phases Are:validate, Initialize, generate-sources, process-sources, Generate-resources, Process-resources, compile, process-classes, generate-test-sources, Process-test-sources, Generate-test-resources, Process-test-resources, Test-compile, process-test-classes, test, Prepare-package, package, Pre-integration-test, Integration-test, Post-integration-test, verify, install, deploy, Pre-clean, clean, Post-clean, Pre-site, site, Post-site, Site-deploy. -> [Help 1]
[ERROR]
[ERROR] To the "full stack" trace of the errors, re-run Maven with THE-E switch.
[ERROR] Re-run Maven using The-x switch to enable the full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
The command has a Chinese symbol (-)
Eror
2
[INFO]------------------------------------------------------------------------
[INFO] Build failure
[INFO]------------------------------------------------------------------------
[INFO] Total time:01:06 H
[INFO] Finished at:2016-10-12t23:07:53+08:00
[INFO] Final memory:81m/320m
[INFO]------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (make) on project Hadoop-common:an Ant build Exception has occured:execute failed:java.io.IOException:Cannot run program ' CMake ' (in directory/root/compilehadoop/ Hadoop-2.6.5-src/hadoop-common-project/hadoop-common/target/native "): error=2, No such file or directory
[ERROR] around Ant part ... <exec dir= "/root/compilehadoop/hadoop-2.6.5-src/hadoop-common-project/hadoop-common/ Target/native "executable=" CMake "failonerror=" true "... @ 4:140 in/root/compilehadoop/hadoop-2.6.5-src/ Hadoop-common-project/hadoop-common/target/antrun/build-main.xml
[ERROR]-> [Help 1]
[ERROR]
[ERROR] To the "full stack" trace of the errors, re-run Maven with THE-E switch.
[ERROR] Re-run Maven using The-x switch to enable the full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, your can resume the build with the command
[ERROR] mvn <goals>-rf:hadoop-common
[Root@bigdatahadoop hadoop-2.6.5-src]#
Yum Install CMake
Tar zxvf apache-ant-1.9.4-bin.tar.gz
Configure Environment variables
Export ant_home=/root/apache-ant-1.9.4
export path=.: $PATH: $JAVA _home/bin: $MAVEN _home/bin: $ANT _home/bin
Entry into force and testing
1 source/etc/profile
2 ant -version
Last installed successfully 70 minutes:
[INFO] hadoop-mapreduce ....... ....... ...... ......... ... SUCCESS [4.775 S]
[INFO] Apache Hadoop MapReduce streaming ........... SUCCESS [20.396 S]
[INFO] Apache Hadoop distributed Copy .......... ..... SUCCESS [02:05 min]
[INFO] Apache Hadoop Archives ....... ........ ......... SUCCESS [14.173 S]
[INFO] Apache Hadoop rumen ..... ....... ...... ..... ....... SUCCESS [33.443 S]
[INFO] Apache Hadoop gridmix ......... ....... ........ SUCCESS [27.265 S]
[INFO] Apache Hadoop Data Join ..... ......... ......... SUCCESS [11.006 S]
[INFO] Apache Hadoop Ant Tasks ..... ................ SUCCESS [7.516 S]
[INFO] Apache Hadoop Extras ......... ....... .......... SUCCESS [8.966 S]
[INFO] Apache Hadoop pipes ..... ....... ...... ..... ....... SUCCESS [11.747 S]
[INFO] Apache Hadoop OpenStack support ............ SUCCESS [15.736 S]
[INFO] Apache Hadoop Amazon Web Services support ..... SUCCESS [09:39 min]
[INFO] Apache Hadoop Client ..... ........... ...... ...... SUCCESS [9.931 S]
[INFO] Apache Hadoop mini-cluster ........... ........ SUCCESS [1.846 S]
[INFO] Apache Hadoop Scheduler Load Simulator ....... SUCCESS [10.474 S]
[INFO] Apache Hadoop Tools Dist ........ ............ SUCCESS [17.429 S]
[INFO] Apache Hadoop Tools ..... ......... ....... ....... SUCCESS [0.076 S]
[INFO] Apache Hadoop distribution ........... ........ SUCCESS [01:24 min]
[INFO]------------------------------------------------------------------------
[INFO] Build SUCCESS
[INFO]------------------------------------------------------------------------
[INFO] Total Time:01:13 H
[INFO] Finished at:2016-10-13t20:36:32+08:00
[INFO] Final memory:115m/487m
[INFO]------------------------------------------------------------------------
[Root@bigdatahadoop hadoop-2.6.5-src]#