第零:配置yum源
yum install gcc
yum install gcc-c++
yum install make
yum install cmake
yum install openssl-devel
yum install ncurses-devel
第一:安装JDK1.7.0_45及配置环境变量
第二:安装Apache Maven 3.2.1及配置环境变量
第三:安装ProtoclBuffer及配置环境变量 protobuf-2.5.0.tar.gz
第四:设置maven仓库 vim /usr/local/maven/conf/settings.xml
<localRepository>/opt/hn/mavenRep</localRepository>
第五:如果公司设置代理, 配置代理
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.xxx</host>
<port>8888</port>
</proxy>
第六:安装cmake及配置环境变量 cmake-2.8.12.2.tar.gz
环境变量:
export JAVA_HOME=/usr/local/jdk
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
#protobuf
export PROTOC_HOME=/usr/local/protobuf
export PATH=$PROTOC_HOME/bin/:$PATH
#cmake
export CMAKE_HOME=/usr/local/cmake
export PATH=$CMAKE_HOME/bin/:$PATH
#maven
export MAVEN_HOME=/usr/local/maven
export CLASSPATH=.:$CLASSPATH:$MAVEN_HOME/lib
export PATH=$MAVEN_HOME/bin:$PATH
第七:下载hadoop 2.2.0源码并编译
http://www.us.apache.org/dist/hadoop/common/hadoop-2.2.0/hadoop-2.2.0-src.tar.gz
拷贝到/opt/somedir/目录下解压
tar -xvf hadoop-2.2.0-src.tar.gz
第八:进入hadoop-2.2.0-src目录进行编译
mvn package -DskipTests -Pdist,native
结果:
[INFO]
[INFO] Apache Hadoop Main ................................ SUCCESS [03:42 min]
[INFO] Apache Hadoop Project POM ......................... SUCCESS [02:02 min]
[INFO] Apache Hadoop Annotations ......................... SUCCESS [01:18 min]
[INFO] Apache Hadoop Assemblies .......................... SUCCESS [ 0.411 s]
[INFO] Apache Hadoop Project Dist POM .................... SUCCESS [02:00 min]
[INFO] Apache Hadoop Maven Plugins ....................... SUCCESS [01:54 min]
[INFO] Apache Hadoop Auth ................................ SUCCESS [01:01 min]
[INFO] Apache Hadoop Auth Examples ....................... SUCCESS [ 37.663 s]
[INFO] Apache Hadoop Common .............................. SUCCESS [06:57 min]
[INFO] Apache Hadoop NFS ................................. SUCCESS [ 32.817 s]
[INFO] Apache Hadoop Common Project ...................... SUCCESS [ 0.126 s]
[INFO] Apache Hadoop HDFS ................................ SUCCESS [05:16 min]
[INFO] Apache Hadoop HttpFS .............................. SUCCESS [ 35.309 s]
[INFO] Apache Hadoop HDFS BookKeeper Journal ............. SUCCESS [01:22 min]
[INFO] Apache Hadoop HDFS-NFS ............................ SUCCESS [ 7.400 s]
[INFO] Apache Hadoop HDFS Project ........................ SUCCESS [ 0.139 s]
[INFO] hadoop-yarn ....................................... SUCCESS [01:42 min]
[INFO] hadoop-yarn-api ................................... SUCCESS [01:05 min]
[INFO] hadoop-yarn-common ................................ SUCCESS [ 43.943 s]
[INFO] hadoop-yarn-server ................................ SUCCESS [ 0.260 s]
[INFO] hadoop-yarn-server-common ......................... SUCCESS [ 16.507 s]
[INFO] hadoop-yarn-server-nodemanager .................... SUCCESS [ 27.990 s]
[INFO] hadoop-yarn-server-web-proxy ...................... SUCCESS [ 4.840 s]
[INFO] hadoop-yarn-server-resourcemanager ................ SUCCESS [ 22.708 s]
[INFO] hadoop-yarn-server-tests .......................... SUCCESS [ 0.852 s]
[INFO] hadoop-yarn-client ................................ SUCCESS [ 8.471 s]
[INFO] hadoop-yarn-applications .......................... SUCCESS [ 0.155 s]
[INFO] hadoop-yarn-applications-distributedshell ......... SUCCESS [ 4.961 s]
[INFO] hadoop-mapreduce-client ........................... SUCCESS [ 0.189 s]
[INFO] hadoop-mapreduce-client-core ...................... SUCCESS [ 38.164 s]
[INFO] hadoop-yarn-applications-unmanaged-am-launcher .... SUCCESS [ 4.214 s]
[INFO] hadoop-yarn-site .................................. SUCCESS [ 0.247 s]
[INFO] hadoop-yarn-project ............................... SUCCESS [ 46.761 s]
[INFO] hadoop-mapreduce-client-common .................... SUCCESS [ 27.332 s]
[INFO] hadoop-mapreduce-client-shuffle ................... SUCCESS [ 4.649 s]
[INFO] hadoop-mapreduce-client-app ....................... SUCCESS [ 17.359 s]
[INFO] hadoop-mapreduce-client-hs ........................ SUCCESS [ 7.947 s]
[INFO] hadoop-mapreduce-client-jobclient ................. SUCCESS [ 10.620 s]
[INFO] hadoop-mapreduce-client-hs-plugins ................ SUCCESS [ 3.098 s]
[INFO] Apache Hadoop MapReduce Examples .................. SUCCESS [ 9.794 s]
[INFO] hadoop-mapreduce .................................. SUCCESS [ 3.233 s]
[INFO] Apache Hadoop MapReduce Streaming ................. SUCCESS [ 7.550 s]
[INFO] Apache Hadoop Distributed Copy .................... SUCCESS [01:39 min]
[INFO] Apache Hadoop Archives ............................ SUCCESS [ 3.829 s]
[INFO] Apache Hadoop Rumen ............................... SUCCESS [ 11.053 s]
[INFO] Apache Hadoop Gridmix ............................. SUCCESS [ 7.880 s]
[INFO] Apache Hadoop Data Join ........................... SUCCESS [ 4.962 s]
[INFO] Apache Hadoop Extras .............................. SUCCESS [ 4.782 s]
[INFO] Apache Hadoop Pipes ............................... SUCCESS [ 15.062 s]
[INFO] Apache Hadoop Tools Dist .......................... SUCCESS [ 2.020 s]
[INFO] Apache Hadoop Tools ............................... SUCCESS [ 0.042 s]
[INFO] Apache Hadoop Distribution ........................ SUCCESS [ 20.225 s]
[INFO] Apache Hadoop Client .............................. SUCCESS [ 5.991 s]
[INFO] Apache Hadoop Mini-Cluster ........................ SUCCESS [ 0.216 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 38:27 min
[INFO] Finished at: 2014-05-20T23:45:29+08:00
[INFO] Final Memory: 99M/382M
[INFO] ------------------------------------------------------------------------
hadoop@hadoopMaster:/opt/hn/hadoop_family/hadoop-2.2.0-src$
第九: 版本验证
hadoop@hadoopMaster:/opt/hn/hadoop_family/hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0/bin$ ./hadoop version
Hadoop 2.4.0
Subversion Unknown -r Unknown
Compiled by root on 2014-05-06T08:19Z
Compiled with protoc 2.5.0
From source with checksum 375b2832a6641759c6eaf6e3e998147
This command was run using /usr/local/hadoop/share/hadoop/common/hadoop-common-2.4.0.jar
分享到:
相关推荐
在Ubuntu 12.04系统中,如果你需要将32位的Hadoop 2.2.0编译成64位,以下是一份详细的步骤指南。首先,确保你的系统支持64位编译,并且你已经具备了必要的权限。 1. **安装GCC**: 在编译任何软件之前,你需要安装...
标题“Ubuntu 12.04 64位编译cm-10.2 总结”涉及到的是在Ubuntu 12.04 LTS(长期支持版)64位操作系统上编译CyanogenMod(CM)10.2的过程。CyanogenMod是一个基于Android开源项目的第三方操作系统,CM 10.2是针对...
在 Ubuntu12.04 上安装 Hadoop-1.2.1 的过程涉及到多个环节,包括系统准备、用户权限设置、Java 开发环境的安装、Hadoop 的下载与配置、主机名与网络设置以及 SSH 无密码登录的实现。以下是对这些步骤的详细解释: ...
ubuntu-12.04-desktop-i386.iso
在本文中,我们将深入探讨如何在Ubuntu 14.04上成功安装qtopia-free-2.2.0,这是一个基于Qt的嵌入式图形界面框架。在尝试安装qtopia-free时,可能会遇到一些依赖性问题,特别是与uic(用户界面编译器)、libqt3-mt...
标题“libc6 for ubuntu12.04”涉及的是Ubuntu 12.04操作系统中的一个关键系统库——libc6。这个标题表明这是一个针对该特定版本Ubuntu的libc6软件包,它是Linux系统中核心的C语言运行时库。 **libc6详解** libc6...
在本文中,我们将详细探讨如何在Ubuntu 12.04环境下进行VLC-2.1.1的交叉编译,以生成适用于Windows 32位系统的程序。这个过程涉及到安装必要的工具,设置编译环境,以及配置和编译源代码。 首先,交叉编译是在一个...
《Ubuntu在ARM架构下的触屏驱动安装与配置详解——基于pmLinux-Ubuntu-12.04-20.10-x86-arm-Driver》 在嵌入式系统和物联网领域,Ubuntu操作系统因其开源、稳定且丰富的软件库而备受青睐。尤其是针对ARM架构的设备...
在Windows 7环境下硬盘安装Linux操作系统,如Fedora 17、CentOS 6.2、Ubuntu 12.04以及LinuxMint 13 64-bit,是一种方便快捷的方法,尤其适用于不想或无法使用USB或光盘安装的情况。这种方法涉及到的操作主要包括...
使用ubuntu 12.04 64位环境安装 adb fastboot,.de文件即可使用。 将android设备连接至电脑,通过lsusb查看usb设备,如下红色部分对应的就是android设备。 重启adb服务,adb devices有设备说明adb安装成功 $adb kill-...
在Ubuntu 12.04操作系统中安装MySQL数据库是一个系统性的过程,涉及多个步骤。以下是详细的安装教程: 1. **获取管理员权限**: 在开始安装之前,确保你有管理员权限,可以通过运行`sudo -i`命令切换到超级用户...
《在Ubuntu 12.04环境下编译与学习APUE源码》 APUE(Advanced Programming in the UNIX Environment)是一本经典的UNIX/Linux系统编程教材,由Stephen R. Henderson和Richard Stevens共同撰写,旨在深入讲解UNIX...
在本文中,我们将深入探讨如何在Ubuntu Server 12.04 64位系统上编译并安装zhcon 0.2.6。zhcon是一款开源的中文终端模拟器,它支持UTF-8编码,使得在Linux环境中使用中文变得更加方便。在没有图形化界面的服务器上,...
在Ubuntu 12.04 LTS(一个基于Debian的Linux发行版)的i386架构上编译意味着这个OpenCV版本已经适应了32位系统。这很重要,因为虽然64位系统已经成为主流,但仍有大量32位系统在运行,尤其是在嵌入式设备或旧硬件上...
在本文中,我们将深入探讨如何在Ubuntu 12.04服务器上安装Git以及与之相关的gitolite工具,这是一个用于管理和控制Git仓库的强大系统。首先,我们将介绍如何使用包管理器安装Git,接着设置SSH访问,最后我们将详细...
本文档总结了如何在Ubuntu12.04 64bit下搭建Android编译环境
Ubuntu12.04的apt-get搜狐源,直接下载至/etc/apt/下即可,执行apt-get update
Ubuntu Core是Ubuntu操作系统的一个精简版,专为物联网设备和边缘计算设计,它提供了一个安全、可更新的基础系统,强调可靠性和安全性。 该压缩包"全志 a20 ubuntu-core-14.04-core-armhf.tar.gz"显然包含了针对...
Ubuntu12.04下安装Hadoop2.4.0单机模式详细教程
本文将详细介绍如何在Ubuntu 12.04 Server上安装Git以及使用Gitolite进行版本控制管理。首先,我们通过包管理器`apt-get`来安装Git。在Ubuntu系统中,我们可以执行以下命令来安装Git基础组件: 1. `sudo apt-get ...