Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to compile Hadoop

Shulou Source: shulou.com Published: 2022-05-31 20:53:58 09月22日 Update

This article introduces the relevant knowledge of "how to compile Hadoop". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Environment: ubuntu14.04 64-bit

The premise is that the system has installed jdk and the environment variables have been configured.

1. Download the hadoop source code wget http://mirror.esocc.com/apache/hadoop/common/hadoop-2.4.0/hadoop-2.4.0-src.tar.gz and decompress: tar-zxf hadoop-2.4.0-src.tar.gz

two。 Install maven: do not use apt-get to install, download the maven3.0.5 version directly to the official website and decompress it to / usr/lib/jvm/maven/, and edit ~ / .bashrc to configure the environment variables of maven:

Export M2_HOME=/usr/lib/jvm/maven

Export PATH=$M2_HOME/bin:$PATH

Source ~ / .bashrc to make the configuration effective

3. Install cmake,g++,pkgconfig:sudo apt-get install cmake gaming + pkg-config

4. Install protobuf:sudo apt-get install libprotobuf-dev protobuf-compiler

5. Install ant: sudo apt-get install ant

6. Install ssl: sudo apt-get install libssl-dev

Enter the extracted hadoop source directory and run: mvn package-Pdist,native-DskipTests-Dtar. After a long wait, the compilation is completed.

Note: since the jdk we installed before is 1.8, all kinds of errors will be reported when compiling. The current solution is to compile with 1.7 version first.

This is the end of "how to compile Hadoop". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Compilation version environment configuration content variables more source code knowledge practical long successful learning next premise method dilemma reality situation article time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Technology vpn NVidia MySQL