Hadoop2.7.7源码编译(Centos6.10)
程序员文章站
2022-07-12 11:48:16
...
源码包准备【hadoop-2.7.7-src.tar.gz】
略
解压后找到构建说明【BUILDING.txt】,看一下基本要求都有什么
安装以下软件【以防万一】没有列全:
yum install -y gcc
yum install -y gcc-c++
yum install -y make
* Unix System
Centos6.10
* JDK 1.7+
略
* Maven 3.0 or later
#maven
export M2_HOME=/opt/apache-maven-3.3.9
export PATH=$PATH:$M2_HOME/bin
####################################################
mvn -version
* Findbugs 1.3.9 (if running findbugs)
#findbugs
export FINDBUGS_HOME=/opt/findbugs-3.0.0
export PATH=$PATH:$FINDBUGS_HOME/bin
####################################################
findbugs -version
* ProtocolBuffer 2.5.0
./configure --prefix=/opt/protobuf-2.5.0
make
make check #可以忽略
make install
####################################################
#proto
export PROTOBUF_HOME=/opt/protobuf-2.5.0
export PATH=$PATH:$PROTOBUF_HOME/bin
####################################################
protoc --version
* Zlib devel (if compiling native code)
yum install -y zlib zlib-devel
* openssl devel ( if compiling native hadoop-pipes and to get the best HDFS encryption performance )
yum install -y openssl devel
* Internet connection for first build (to fetch all Maven and Hadoop dependencies)
略
ant
#ant
export ANT_HOME=/opt/apache-ant-1.10.5
export PATH=$PATH:$ANT_HOME/bin
####################################################
ant -version
snappy
./autogen.sh
./configure
make
make install
ls -lh /usr/local/lib | grep snappy
Building:
编译进入/root/hadoop/hadoop-2.7.7-src
export MAVEN_OPTS="-Xms512m -Xmx1024m" #适当调整
mvn package -Pdist,native -DskipTests -Dtar
编译成功,整个过程有很多坑,其实总时间也就10分多钟
推荐阅读
-
深入解析Vue源码实例挂载与编译流程实现思路详解
-
MySQL 5.7.13 源码编译安装配置方法图文教程
-
Mac系统下源码编译安装MySQL 5.7.17的教程
-
Android笔记之:CM9源码下载与编译的应用
-
centos源码编译php5 mcrypt模块步骤详解
-
Ubuntu Docker 源码编译(1.9.1 )详解
-
解决Python源码编译时提示:ModuleNotFoundError: No module named ‘distutils.command‘
-
Ubuntu 17.04系统下源码编译安装opencv的步骤详解
-
华为方舟编译器正式开源:相关源码已开放下载
-
Centos7通过yum跟源码编译安装Nginx