centos 编译 64位 hadoop2.2.0 版本

1. 安装Maven

安装 Maven 3.1.4

$ wget http://mirror.esocc.com/apache/maven/maven-3/3.1.4/binaries/apache-maven-3.1.4-bin.tar.gz
$ sudo tar zxf apache-maven-3.1.4-bin.tar.gz -C /opt
$ sudo vim /etc/profile
export MAVEN_HOME=/opt/apache-maven-3.1.4export PATH=$PATH:$MAVEN_HOME/bin


2. 安装Ant

$ wget http://apache.dataguru.cn//ant/binaries/apache-ant-1.9.4-bin.tar.gz
$ sudo tar zxf apache-ant-1.9.4-bin.tar.gz -C /opt
$ sudo vim /etc/profile
export ANT_HOME=/opt/apache-ant-1.9.4
export PATH=$PATH:$ANT_HOME/bin

3. 安装Findbugs

$ wget http://prdownloads.sourceforge.net/findbugs/findbugs-2.0.3.tar.gz?download
$ sudo tar zxf findbugs-2.0.3.tar.gz -C /opt
$ sudo vim /etc/profile
export FINDBUGS_HOME=/opt/findbugs-2.0.3
export PATH=$PATH:$FINDBUGS_HOME/bin

4.下载protobuf-2.5.0.tar.bz2

wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2

编译安装 protobuf

tar -xvf protobuf-2.5.0.tar.bz2

cd protobuf-2.5.0

./configure --prefix=/opt/protoc/  --protobuf 安装至/opt/protoc

make

make install

配置环境变量:

export PROTOC_HOME=/opt/protoc

export PATH=$PATH:$PROTOC_HOME/bin

使配置文件生效:source /etc/profile

验证: protoc --version

5 .安装 依赖库

yum install cmake

yum install lzo-devel

yum install zlib-devel

yum install openssl-devel

yum install ncurses-devel

 yum install cmake lzo-devel  zlib-devel  gcc autoconf automake libtool   ncurses-devel openssl-deve

6. 编译源码

cd hadoop-2.2.0-src
mvn package -DskipTests -Pdist,native -Dtar



你可能感兴趣的:(centos 编译 64位 hadoop2.2.0 版本)