1. Installing the JDK
JDK: I'm installing jdk1.6.0_23 here.
1.1: Permissions to File execution chmod u+x jdk-6u23-linux-x64.bin
1.2:./jdk-6u23-linux-x64.bin, generates a jdk1.6.0_23 file
1.3: Add environment variable in/etc/profile file configuration
Export java_home=/home/hadoop/jdk1.6. 0_23export PATH= $PATH: $JAVA _home/bin
Enter Java-version If a version comes out, it means success.
2. Install Maven
After downloading the installation package, unzip the/etc/profile to configure the road.
Export maven_home=/home/hadoop/apache-maven-3.2.1export PATH= $PATH: $MAVEN _home/bin
Input Mvn-v
[Email protected] ~]$ mvn-3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14t09:37:52-08:00 /home/hadoop/apache-maven-3.2.11.6/home/hadoop/jdk1.6.0_23/jredefault Locale:en_us, Platform Encoding:utf-8"Linux", Version: "2.6.32-431.el6.x86_64", Arch: "AMD64", Family: "Unix"
Indicates successful installation
3, gcc,g++
Refer to my previous article Linux CentOS Mount g++ can't be installed
4, Protoc
I'm installing protobuf-2.4.1.
Tar zxvf protobuf-2.4.1.tar.gz
CD protobuf-2.4.1
./configure && Make && Make check && Make Install
Environment variable configuration:
Export protoc_home=/home/hadoop/protobuf-2.4.1 export PATH= $PROTOC _home/src: $PATH
It is important to note that 2.4.1 version no directory bin with Src instead, this I toss for a long time.
[Email protected] ~]$ Protoc--2.4.1
Indicates successful installation
5. Other dependencies
sequential execution of the following commands yum install cmake yum install OpenSSL-devel yum install ncurses-devel
6. Ant
Some information on the internet said to install ant, I did not install also found that can be compiled
7, compile CDH4.5 source code
TAR-ZXVF hadoop-2.0.0-cdh4.5.0.tar.gz
Go to the directory CD $HADOOP _HOME/SRC, then execute MVN package-dskiptests-pdist,native,docs (time to compile)
The first time you run into an error, delete the entire file and re-execute it.
To view the log prompt compilation complete:
[INFO] Apache Hadoop rumen ......... .............. SUCCESS [6.738 s][info] Apache Hadoop gridmix ......... ............ SUCCESS [4.798 s][info] Apache Hadoop Data Join ......... .......... SUCCESS [2.669 s][info] Apache Hadoop Extras ......... ............. SUCCESS [3.134 s][info] Apache Hadoop Pipes ......... .............. SUCCESS [18.866 s][info] Apache Hadoop Tools Dist ......... ......... SUCCESS [3.303 s][info] Apache Hadoop Tools ......... .............. SUCCESS [0.027 S][info] Apache Hadoop distribution ............... SUCCESS [51.497 s][info] Apache Hadoop Client ......... ............. SUCCESS [16.715 s][info] Apache Hadoop mini-cluster ............... SUCCESS [4.659 s][info]------------------------------------------------------------------------[INFO] BUILD Success[info]------------------------------------------------------------------------[INFO] Total time:14:12 min[ INFO] FinisheD At:2014-07-23t00:11:20-08:00[info] Final memory:93m/238m
encountered an exception: An exception was encountered when executing the first time:
[ERROR] Failed to execute goal org.apache.avro:avro-maven-plugin:1.7.4:schema
(generate-avro-test-sources) On project Hadoop-common:
Execution generate-avro-test-sources of goal org.apache.avro:avro-maven-plugin:1.7.4: Schema
Failed:plugin org.apache.avro:avro-maven-plugin:1.7.4 or one of its dependencies
could not be RESOLVED:FA iled to collect dependencies at org.apache.avro:avro-maven-plugin:jar:1.7.4->
Org.apache.avro:avro-compiler: jar:1.7.4-commons-lang:commons-lang:jar:2.6:failed to read artifact
Descriptor for commons-lang:commons-lang:jar:2.6:could not transfer
Artifact Org.apache.commons:commons-parent:pom:17 from/to Central
(Http:// REPO.MAVEN.APACHE.ORG/MAVEN2): GET request Of:org/apache/commons/commons-parent/17/commons-parent-17.pom from Central
Failed:connection Reset--[help 1]
This exception does not resolve