Hadoop execution run-report warning for download on official website:
WARN util. nativecodeloader:unable to load Native-hadoop library for your platform ... using Builtin-java classes where applicable
Put: './in ': No such file or directory
The main is Lib under the Native-hadoop is 32 bits, so here we ourselves on the 64-bit system to compile Hadoop
Environment Preparation:
1 Download Hadoop src source Bundle
2 Required Software: Java, SVN, autoconf, Automake, Libtool, Ncurses-devel, Openssl-devel, GCC, lzo-devel, Zlib-devel, Znt, maven, Proto BUF, CMake
Yum-y Install autoconf automake libtool ncurses-devel openssl-devel gcc lzo-devel, zlib-devel cmake
3 Installing the JDK
Download the JDK bin package and unzip it
Add JDK Environment variables
Add under the/etc/profile file
# # JAVA
Export JAVA_HOME=/USR/LOCAL/JAVA/JDK
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
# # PATH
Export Path= $JAVA _home/bin
Let the overloaded environment variable. /etc/profile
4 maven Installation
Download maven and unzip the Apache website and add its bin path to the environment variable
Mvn-version
5 PROTOBUF Installation
Search online for protobuf-2.5.0.tar.gz, download unzip,
./configure; Make Make install
Protoc--version
6 Ant Installation
Apache Download ANT Bin package to extract the bin path to the environment variable
7 Compiling Hadoop
MVN Package-pdist,native,docs-dskiptests-dtar
It takes one hours or more, and requires a networked download of dependent packages
The final file is in Hadoop-2.7.2-src/hadoop-dist/target.
Can directly take the hadoop-2.7.2 directory to deploy, there is a hadoop-2.7.2.tar.gz package
Compiling Hadoop 2.7 on CentOS