Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How the Win7 64bit hadoop-2.6.0 source code compiles the deployment package

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "Win7 64bit hadoop-2.6.0 source code how to compile deployment package", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "Win7 64bit hadoop-2.6.0 source code how to compile deployment package" bar!

1. The tools you need to prepare are:

A. hadoop-2.6.0 source code (hadoop-2.6.0-src .tar.gz): https://hadoop.apache.org/releases.html

B. Windows 7 64bits

C. Microsoft Windows SDK v7.1

You may encounter problems during the installation of SDK v7.1. Problem solving reference: https://support.microsoft.com/zh-cn/kb/2934068/zh-cn

D. maven3.0 or later, in this case maven3.0.4

E. Protocol Buffers 2.5.0: http://protobuf.googlecode.com/files/protoc-2.5.0-win32.zip

Note: version 2.5.0 is required

F. Jdk (1.6 or later), in this case using jdk1.7.0_67

G. CMake (cmake-3.3.0-rc3-win32-x86.exe): http://www.cmake.org/download/

H. Zlib headers: http://code.google.com/p/psi-dev/downloads/detail?name=zlib-1.2.7-win.7z

I. Ant: http://ant.apache.org/bindownload.cgi

two。 Concrete steps

Before build, read the BUILDING.txt file in the root directory of the source code carefully, in which the Building on Windows section has detailed instructions

a. Extract hadoop-2.6.0-src .tar.gz to a directory with a shorter path length, such as D:\ hadoop, structure diagram:

b. Install cmake-3.3.0-rc3-win32-x86.exe

Install to the specified directory (e.g. f:\ cmake), and then add the bin directory (f:\ cmake\ bin) to the environment variable Path

Note: if you have installed cygwin in windows, because there is also a cmake in cygwin, in Path, the bin directory of cmake must be added before the bin directory of cygwin, otherwise the following error will be reported:

[exec] CMake Error: Could not create named generator Visual Studio 10 Win64 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (make) on project hadoop-hdfs: An Ant BuildException has occured: exec returned: 1 [ERROR] around Ant part. @ 5hadoop-hdfs-project 109 in D:\ hadoop\ hadoop-hdfs-project\ hadoop-hdfs\ target\ antrun\ build-main.xml

c. Download Protocol Buffers 2.5.0, decompress, and copy protoc.exe to C:\ Windows\ System32, otherwise the following error will be reported:

Failed to execute goalorg.apache.hadoop:hadoop-maven-plugins:2.6.0:protoc (compile-protoc) on project hadoop-common

d. Download zlib, extract, copy all the contents under the x86room64 directory to the specified directory (such as: d:\ zlib-1.2.7), and add the bin directory (D:\ zlib-1.2.7\ bin) to the Path

e. Install Ant (for this example: apache-ant-1.9.5-bin.zip), extract, install to the specified directory, and add the bin directory to the Path

f. Set environment variabl

(1) JAVA_HOME

(2) M2_HOME:maven installation directory (such as: F:\ maven304)

(3) Platform: specify whether to use build on 32-bit or 64-bit systems, which can be set to x64 or Win32

In this example, x64 is set, and the word "Platform" is case-sensitive, so don't misspell it.

(4) ZLIB_HOME: (for example: d:\ zlib-1.2.7)

(5) Path: add the bin directory of maven to Path

Add the bin directory of Microsoft Windows SDK to Path

g. Open Windows SDK 7.1 Command Prompt (start-> all programs-> Microsoft Windows SDK v7.1)

In the command window, change the directory, enter the hadoop-2.6.0 source directory (for example: d:\ hadoop), and execute the following command:

Mvn package-Pdist,native-win-DskipTests-Dtar

Some errors may be encountered in the process of build. Related to Visual Studio 2010 Professional, Visual Studio 2010 Professional is not installed on this machine, but Visual Studio 2012 Professional is installed. The problems encountered are:

A. org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (compile-ms-winutils) on project hadoop-common: Command execution failed.

Problem solving: go to the source directory (for example: d:\ hadoop\ hadoop-common-project\ hadoop-common\ src\ main\ winutils), reopen the winutils.sln project with VS2012, and recompile it again. There may be errors in the compilation process, never mind.

B. Org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (compile-ms-native-dll) on project adoop-common: Command execution failed.

Problem solving: go to the source directory (for example: d:\ hadoop\ hadoop-common-project\ hadoop-common\ src\ main\ native), reopen the native.sln project with VS2012, and recompile it again. There may be errors in the compilation process, never mind.

If all goes well, there will be a long-awaited picture:

Thank you for reading, the above is the content of "Win7 64bit hadoop-2.6.0 source code how to compile the deployment package". After the study of this article, I believe you have a deeper understanding of how the Win7 64bit hadoop-2.6.0 source code compiles the deployment package, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report