hadoop2.5.1重新编译native驱动

hadoop2.5.1重新编译native驱动

 

环境信息

      操作系统:Red Hat 6.4 64bit

      注:此机器必须能连网

软件列表

      Hadoop 2.5.1

      Jdk 1.7.45

      gcc 4.4.7、gcc-c++、gcc-c++-devl

      Make 3.81

      cmake 3.0.2   依赖包zlib1g-dev、libssl-dev

      Maven 3.2.3

      Ant 1.9.4

      protobuf 2.5.0

      zlib

以上是经过总结所需要的软件包清单,如果没有涉及到的安装包基本上可以在系统光盘中找到。

配置环境变量

$vi /etc/profile

#set java env
export JAVA_HOME=/usr/java/jdk1.7.0_45
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$CLASSPATH
#set ant env
export ANT_HOME=/opt/apache-ant-1.9.4
export PATH=$ANT_HOME/bin:$PATH

#set maven env
export MAVEN_HOME=/opt/apache-maven-3.2.3
export PATH=$MAVEN_HOME/bin:$PATH

#set hadoop env
export HADOOP_HOME=/home/hadoop/hadoop-2.5.1
export LD_LIBRARY_PATH=$HADOOP_HOME/lib:$LD_LIBRARY_PATH
export PATH=$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$PATH
export CLASSPATH=$HADOOP_HOME/lib:$CLASSPATH

保存退出!

$source /etc/profile

vi $MAVEN_HOME/conf/settings.xml
在<mirrors></mirrors>标签中添加:

<mirror>
      <id>nexus-osc</id>
      <mirrorOf>*</mirrorOf>
      <name>Nexusosc</name>
      <url>http://maven.oschina.net/content/groups/public/</url>
</mirror>

在<profiles></profiles>标签中添加:

<profile>
      <id>jdk-1.7</id>
      <activation>
        <jdk>1.7</jdk>
      </activation>
      <repositories>
        <repository>
          <id>nexus</id>
          <name>local private nexus</name>
          <url>http://maven.oschina.net/content/groups/public/</url>
                 <releases>  
              <enabled>true</enabled>  
          </releases>  
          <snapshots>  
               <enabled>false</enabled>  
          </snapshots> 
        </repository>
      </repositories>
      <pluginRepositories>  
         <pluginRepository>  
           <id>nexus</id>  
          <name>local private nexus</name>  
           <url>http://maven.oschina.net/content/groups/public/</url>  
           <releases>  
             <enabled>true</enabled>  
           </releases>  
           <snapshots>  
             <enabled>false</enabled>  
           </snapshots>  
         </pluginRepository>  
      </pluginRepositories>
 </profile>

 

编译驱动

     初次运行:
    $mvn package -Pdist,native -Dskiptests -Dtar  
    再次运行:
    $mvn clean package -Dmaven.test.skip=true
    $mvn package -Pdist,native -Dskiptests -Dtar

    正常编译需要等待40分钟左右

    $cp hadoop-2.5.1-src/hadoop-dist/target/hadoop-2.5.1/lib/native

 

驱动下载

链接:http://pan.baidu.com/s/1kTIExGN 密码:og7i

 

你可能感兴趣的:(hadoop,redhat,native,2.5.1)