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.0java

2.配置yum

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

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 密碼: hybubash

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.gzmaven

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
相關文章
相關標籤/搜索