Since the server is generally a 64-bit system, the release version of the Hadoop Web site 32-bit native library cannot run, so you need to compile it yourself. The following is a compilation of my process, relatively simple, without downloading various versions and environment configuration, through the command can be completed automatically. The system environment is the Ubuntu Server 64-Bit Edition.
1, install the JDK, I use the OENJDK
sudo apt-get install DEFAULT-JDK
Java-version
Display version information:
Java Version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.14.04.1)
OpenJDK 64-bit Server VM (build 24.65-b04, Mixed mode)
2. Install Maven
sudo apt-get install maven
MVN--version
Display version information:
Maven Home:/usr/share/maven
Java version:1.7.0_65, Vendor:oracle Corporation
Java Home:/usr/lib/jvm/java-7-openjdk-amd64/jre
Default Locale:en_us, Platform Encoding:utf-8
OS name: "Linux", Version: "3.13.0-32-generic", Arch: "AMD64", Family: "Unix"
3, Installation OpenSSH
sudo apt-get install Openssh-server
4. Install dependent libraries
sudo apt-get install g++ autoconf automakelibtool cmake zlib1g-dev pkg-config Libssl-dev
5, Installation Protoc
sudo apt-get install Protobuf-compiler
Protoc--version
Display version information:
Libprotoc 2.5.0
6. OK to start compiling, enter the Hadoop source code directory HADOOP-2.6.0-SRC, execute:
MVN Clean Package-pdist,native-dskiptests-dtar
Well, after a long wait, it should be possible to get the results compiled.
An easy way to compile Hadoop 2.6.0 in Ubuntu environment