一、准备工作
基础环境:centos7
(1)官方源码中编译之前对基础环境及版本的要求(重点是红色部分)
Requirements:
* Unix System
* JDK 1.8
* Maven 3.3 or later
* ProtocolBuffer 2.5.0
* CMake 3.1 or newer (if compiling native code)
* Zlib devel (if compiling native code)
* openssl devel (if compiling native hadoop-pipes and to get the best HDFS encryption performance)
* Linux FUSE (Filesystem in Userspace) version 2.6 or above (if compiling fuse_dfs)
* Internet connection for first build (to fetch all Maven and Hadoop dependencies)
* python (for releasedocs)
* bats (for shell code testing)
* Node.js / bower / Ember-cli (for YARN UI v2 building)
(2)安装hadoop编译所需的环境依赖
1、yum install gcc gcc-c++
2、yum install autoconf automake libtool curl
3、yum install lzo-devel zlib-devel openssl openssl-devel ncurses-devel
4、yum install bzip2 bzip2-dev