欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

centos7-64bit 编译 hadoop2.7.6 源码

程序员文章站 2022-07-12 11:48:22
...

1 安装并配置JDK1.8环境变量

centos7-64bit 编译 hadoop2.7.6 源码

2 安装maven

centos7-64bit 编译 hadoop2.7.6 源码
解压到 usr/apps
centos7-64bit 编译 hadoop2.7.6 源码
配置环境变量
/etc/profile

export MAVEN_HOME=/usr/apps/apache-maven-3.5.4
export PATH=$MAVEN_HOME/bin:$PATH

3 安装 findbugs1.3.9

centos7-64bit 编译 hadoop2.7.6 源码
centos7-64bit 编译 hadoop2.7.6 源码
配置环境变量/etc/profile

export FINDBUGS_HOME=/usr/apps/findbugs-1.3.9
export PATH=$FINDBUGS_HOME/bin:$PATH

4 安装 ProtocolBuffer2.5.0

centos7-64bit 编译 hadoop2.7.6 源码
centos7-64bit 编译 hadoop2.7.6 源码

[aaa@qq.com protobuf-2.5.0]# ./configure
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/usr/apps/protobuf-2.5.0':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
yum install gcc-c++

make
make install

5 安装 cmke

yum install -y cmake

6 安装zlib

yum install zlib-devel

7 安装 openssl devel

yum install -y openssl-devel

8 安装 Linux FUSE

yum install fuse-devel

9 编译 Hadoop 源码

centos7-64bit 编译 hadoop2.7.6 源码
mvn package -Pdist,native -DskipTests -Dtar
centos7-64bit 编译 hadoop2.7.6 源码
centos7-64bit 编译 hadoop2.7.6 源码
centos7-64bit 编译 hadoop2.7.6 源码

相关标签: hadoop源码编译