Centos source code compilation and installation of Hadoop2.6
Centos6.5 (64bit)
Jdk7
Ant1.9.4
Maven3.1.1
Findbugs3.0.0
Protobuf2.5.0
Hadoop2.5.1 source code file
Second, install all the software required above
Software that can be installed by 1.yum
[html] view plaincopy
Yum install svn ncurses-devel gcc* lzo-devel zlib-devel autoconf automake libtool cmake openssl-devel
two。 Install JDK
[html] view plaincopy
Rpm-ivh jdk-8-linux-x64.rpm
Vim / etc/profile
Export JAVA_HOME=/usr/java/jdk1.7.0
Export JRE_HOME=/usr/java/jdk1.7.0/jre
Export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
Export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
3. Install ant
[html] view plaincopy
Tar zxvf apache-ant-1.9.4-bin.tar.gz
Vim / etc/profile
Export ANT_HOME=/usr/local/apache-ant-1.9.4
Export PATH=$PATH:$ANT_HOME/bin
4. Install findbugs
[html] view plaincopy
Tar zxvf findbugs-3.0.0.tar.gz
Vim / etc/profile
Export FINDBUGS_HOME=/usr/local/findbugs-3.0.0
Export PATH=$PATH:$FINDBUGS_HOME/bin
5. Install protobuf
[html] view plaincopy
Tar zxvf protobuf-2.5.0.tar.gz
Cd protobuf-2.5.0
. / configure-- prefix=/usr/local
Make & & make install
6. Install maven
[html] view plaincopy
Tar-zxvf apache-maven-3.1.1-bin.tar.gz
Vim / etc/peofile
Export M2_HOME=/usr/local/apache-maven-3.1.1
Export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
Third, compile hadoop source code
[html] view plaincopy
Tar zxvf hadoop-2.5.1-src.tar.gz
Cd hadoop-2.5.1-src
Mvn package-Pdist,native,docs-DskipTests-Dtar
The last file is in hadoop-2.5.1-src/hadoop-dist/target.
At this point, the self-compiled hadoop2.5.1 has been completed, after testing will no longer appear in the run-time warning, it is really happy!
In addition: if there is a problem when compiling, you might as well consider the version of jdk and the version of each software. I used jdk8 at first, always reported an error, and finally tried jdk7 to be a success.