Because the pre-compiled packages on the official website of Hadoop2 are all compiled in 32 bits, and problems may occur in 64-bit systems, you need to compile and run them on 64-bit systems.
Example: http://apache.osuosl.org/hadoop/common/hadoop-2.2.0/
Download hadoop-2.2.0-src.tar.gz
Decompress the package and run:
- $ Mvn-version
- $ Mvn clean
- $ Mvn install-DskipTests
- $ Mvn compile-DskipTests
- $ Mvn package-DskipTests
- $ Mvn package-Pdist-DskipTests-Dtar
However, the following problems occur during running:
Building Hadoop cannot access org. mortbay. component. AbstractLifeCycle error or class file for org. mortbay. component. AbstractLifeCycle not found solution:
Https://issues.apache.org/jira/browse/HADOOP-10110
Modify the hadoop-common-project/hadoop-auth/pom. xml file as follows:
Https://issues.apache.org/jira/secure/attachment/12614482/HADOOP-10110.patch
Build a Hadoop environment on Ubuntu 13.04
Cluster configuration for Ubuntu 12.10 + Hadoop 1.2.1
Build a Hadoop environment on Ubuntu (standalone mode + pseudo Distribution Mode)
Configuration of Hadoop environment in Ubuntu
Detailed tutorial on creating a Hadoop environment for standalone Edition
Build a Hadoop environment (using virtual machines to build two Ubuntu systems in a Winodws environment)