Linux 内网编译 hadoop-2.5.0

1.环境

CentOS release 6.5 (Final) x86_64
java version "1.7.0_79" 
hadoop-2.5.0-src.tar.gz
apache-maven-3.3.9
protobuf-2.5.0

2.配置yum

yum代理配置:/etc/yum.conf

proxy=http://user1:userpass1@IP:端口
yum -y install svn ncurses-devel gcc*                                             
yum -y install lzo-devel zlib-devel autoconf automake libtool cmake openssl–devel

3.配置Maven

3.1环境变量/etc/profile

export MAVEN_HOME=/opt/apache-maven-3.3.9
export PATH=$PATH:$MAVEN_HOME/bin

3.2内网Maven代理$MAVEN_HOME/conf/setting.xml

<proxy>
    <id>myProxy</id>
    <active>true</active>
    <protocol>http</protocol>
    <host>IP</host>
    <port>端口</port>
    <username>user1</username>
    <password>userpass1</password>
    <nonProxyHosts></nonProxyHosts>
</proxy>

3.3配置Maven中央仓库

<mirror>  
  <id>alimaven</id>  
  <name>aliyun maven</name>  
  <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
  <mirrorOf>central</mirrorOf>          
</mirror>

4.安装protobuf

链接: https://pan.baidu.com/s/1pL2e6jp 密码: hybu

cd protobuf-2.5.0
./configure
make && make install

5.编译 hadoop-2.5.0-src

链接: https://archive.apache.org/dist/hadoop/common/hadoop-2.5.0/hadoop-2.5.0-src.tar.gz

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

6.错误处理

6.1配置Ant代理.相应错误的pom.xml的target下增加代理

<target name="proxy" >
    <setproxy
        proxyhost="IP"
        proxyport="端口"
        proxyuser="user1"
        proxypassword="userpass1"
    />
</target>

6.2Could NOT find OpenSSL, try to set the path to OpenSSL root folder 

export OPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2j
export OPENSSL_INCLUDE_DIR=/usr/local/Cellar/openssl/1.0.2j/include/openssl
export OPENSSL_LIBRARIES=/usr/local/Cellar/openssl/1.0.2j/lib

 

转载于:https://my.oschina.net/fengyunfu/blog/803202

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值