CentOS 6.4 64位 源码编译hadoop 2.2.0
搭建环境:Centos 6.4 64bit
1、安装JDK 参考这里
2、安装maven
maven官方下载地址,可以选择源码编码安装,这里就直接下载编译好的
wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.zip
解压文件后,同样在/etc/profie里配置环境变量
vim /etc/profie
export MAVEN_HOME=/opt/maven3.1.1
export PATH=$PATH:$MAVEN_HOME/bin
source /etc/profile
验证配置是否成功: mvn -version
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 23:22:22+0800)
Maven home: /opt/maven3.1.1
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /opt/jdk1.7/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-358.el6.x86_64", arch: "amd64", family: "unix"
由于maven国外服务器可能连不上,先给maven配置一下国内镜像,在maven目录下,conf/settings.xml,在<mirrors></mirros>里添加,原本的不要动
<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>
3、安装protoc2.5.0
hadoop2.2.0编译需要protoc2.5.0的支持,所以还要下载protoc,
下载地址:https://code.google.com/p/protobuf/downloads/list,要下载2.5.0版本噢
对protoc进行编译安装前先要装几个依赖包:gcc,gcc-c++,make 如果已经安装的可以忽略
yum install gcc
yum intall gcc-c++
yum install make
安装protoc
tar -xvf protobuf-2.5.0.tar.bz2
cd protobuf-2.5.0
./configure --prefix=/opt/protoc/
make && make install
4、需要安装cmake,openssl-devel,ncurses-devel依赖 如果已经安装的可以忽略
yum install cmake
yum install openssl-devel
yum install ncurses-devel
5、编译hadoop
首先官方下载hadoop源码
wget http://mirrors.cnnic.cn/apache/hadoop/common/hadoop-2.2.0/hadoop-2.2.0-src.tar.gz
现在可以进行编译了,
cd hadoop2.2.0-src
mvn package -Pdist,native -DskipTests -Dtar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Hadoop Main ................................ SUCCESS [3.709s]
[INFO] Apache Hadoop Project POM ......................... SUCCESS [2.229s]
[INFO] Apache Hadoop Annotations ......................... SUCCESS [5.270s]
[INFO] Apache Hadoop Assemblies .......................... SUCCESS [0.388s]
[INFO] Apache Hadoop Project Dist POM .................... SUCCESS [3.485s]
[INFO] Apache Hadoop Maven Plugins ....................... SUCCESS [8.655s]
[INFO] Apache Hadoop Auth ................................ SUCCESS [7.782s]
[INFO] Apache Hadoop Auth Examples ....................... SUCCESS [5.731s]
[INFO] Apache Hadoop Common .............................. SUCCESS [1:52.476s]
[INFO] Apache Hadoop NFS ................................. SUCCESS [9.935s]
[INFO] Apache Hadoop Common Project ...................... SUCCESS [0.110s]
[INFO] Apache Hadoop HDFS ................................ SUCCESS [1:58.347s]
[INFO] Apache Hadoop HttpFS .............................. SUCCESS [26.915s]
[INFO] Apache Hadoop HDFS BookKeeper Journal ............. SUCCESS [17.002s]
[INFO] Apache Hadoop HDFS-NFS ............................ SUCCESS [5.292s]
[INFO] Apache Hadoop HDFS Project ........................ SUCCESS [0.073s]
[INFO] hadoop-yarn ....................................... SUCCESS [0.335s]
[INFO] hadoop-yarn-api ................................... SUCCESS [54.478s]
[INFO] hadoop-yarn-common ................................ SUCCESS [39.215s]
[INFO] hadoop-yarn-server ................................ SUCCESS [0.241s]
[INFO] hadoop-yarn-server-common ......................... SUCCESS [15.601s]
[INFO] hadoop-yarn-server-nodemanager .................... SUCCESS [21.566s]
[INFO] hadoop-yarn-server-web-proxy ...................... SUCCESS [4.754s]
[INFO] hadoop-yarn-server-resourcemanager ................ SUCCESS [20.625s]
[INFO] hadoop-yarn-server-tests .......................... SUCCESS [0.755s]
[INFO] hadoop-yarn-client ................................ SUCCESS [6.748s]
[INFO] hadoop-yarn-applications .......................... SUCCESS [0.155s]
[INFO] hadoop-yarn-applications-distributedshell ......... SUCCESS [4.661s]
[INFO] hadoop-mapreduce-client ........................... SUCCESS [0.160s]
[INFO] hadoop-mapreduce-client-core ...................... SUCCESS [36.090s]
[INFO] hadoop-yarn-applications-unmanaged-am-launcher .... SUCCESS [2.753s]
[INFO] hadoop-yarn-site .................................. SUCCESS [0.151s]
[INFO] hadoop-yarn-project ............................... SUCCESS [4.771s]
[INFO] hadoop-mapreduce-client-common .................... SUCCESS [24.870s]
[INFO] hadoop-mapreduce-client-shuffle ................... SUCCESS [3.812s]
[INFO] hadoop-mapreduce-client-app ....................... SUCCESS [15.759s]
[INFO] hadoop-mapreduce-client-hs ........................ SUCCESS [6.831s]
[INFO] hadoop-mapreduce-client-jobclient ................. SUCCESS [8.126s]
[INFO] hadoop-mapreduce-client-hs-plugins ................ SUCCESS [2.320s]
[INFO] Apache Hadoop MapReduce Examples .................. SUCCESS [9.596s]
[INFO] hadoop-mapreduce .................................. SUCCESS [3.905s]
[INFO] Apache Hadoop MapReduce Streaming ................. SUCCESS [7.118s]
[INFO] Apache Hadoop Distributed Copy .................... SUCCESS [11.651s]
[INFO] Apache Hadoop Archives ............................ SUCCESS [2.671s]
[INFO] Apache Hadoop Rumen ............................... SUCCESS [10.038s]
[INFO] Apache Hadoop Gridmix ............................. SUCCESS [6.062s]
[INFO] Apache Hadoop Data Join ........................... SUCCESS [4.104s]
[INFO] Apache Hadoop Extras .............................. SUCCESS [4.210s]
[INFO] Apache Hadoop Pipes ............................... SUCCESS [9.419s]
[INFO] Apache Hadoop Tools Dist .......................... SUCCESS [2.306s]
[INFO] Apache Hadoop Tools ............................... SUCCESS [0.037s]
[INFO] Apache Hadoop Distribution ........................ SUCCESS [21.579s]
[INFO] Apache Hadoop Client .............................. SUCCESS [7.299s]
[INFO] Apache Hadoop Mini-Cluster ........................ SUCCESS [7.347s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11:53.144s
[INFO] Finished at: Fri Nov 22 16:58:32 CST 2013
[INFO] Final Memory: 70M/239M
[INFO] ------------------------------------------------------------------------
直到看到上面的内容那就说明编译完成了。
编译后的路径在:hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0
通过一下命令可以看出hadoop的版本
[root@localhost bin]# ./hadoop version
Hadoop 2.2.0
Subversion Unknown -r Unknown
Compiled by root on 2013-11-22T08:47Z
Compiled with protoc 2.5.0
From source with checksum 79e53ce7994d1628b240f09af91e1af4
This command was run using /data/hadoop-2.2.0-src/hadoop-dist/target/hadoop-2.2.0/share/hadoop/common/hadoop-common-2.2.0.jar
[root@localhost hadoop-2.2.0]# file lib//native/*
lib//native/libhadoop.a: current ar archive
lib//native/libhadooppipes.a: current ar archive
lib//native/libhadoop.so: symbolic link to `libhadoop.so.1.0.0'
lib//native/libhadoop.so.1.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
lib//native/libhadooputils.a: current ar archive
lib//native/libhdfs.a: current ar archive
lib//native/libhdfs.so: symbolic link to `libhdfs.so.0.0.0'
lib//native/libhdfs.so.0.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
CentOS 6.4 64位 源码编译hadoop 2.2.0的更多相关文章
- Centos6.8-hadoop-2.7.2 64 bit源码编译(伪分布-5大守护进程在本机上)
1.安装插件 安装jdk/ant/libtool/protobuf/maven/zlib-devel/openssl-devel/ncurses-devel.gcc.snappy.bzip #set ...
- [笔记] Ubuntu 18.04源码编译安装OpenCV 4.0流程
标准常规安装方法安装的OpenCV版本比较低,想尝鲜使用4.0版本,只好源码安装. 安装环境 OS:Ubuntu 18.04 64 bit 显卡:NVidia GTX 1080 CUDA:10.0 c ...
- 保姆级教程——Ubuntu16.04 Server下深度学习环境搭建:安装CUDA8.0,cuDNN6.0,Bazel0.5.4,源码编译安装TensorFlow1.4.0(GPU版)
写在前面 本文叙述了在Ubuntu16.04 Server下安装CUDA8.0,cuDNN6.0以及源码编译安装TensorFlow1.4.0(GPU版)的亲身经历,包括遇到的问题及解决办法,也有一些 ...
- 源码编译安装 PHP5.5.0,解决curl_exec访问HTTPS返回502错误的问题(修改PATH路径)
最近碰到一个奇怪的问题, PHP使用 curl_exec 访问 HTTPS 网页时, 返回502错误, 访问HTTP网页时没有问题, 用 echo phpinfo() ; 查看, 支持op ...
- tensorflow 源码编译tensorflow 1.1.0到 tensorflow 2.0,ver:1.1.0rc1、1.4.0rc1、1.14.0-rc1、2.0.0b1
目录 tensorflow-build table 更多详细过程信息及下载: tensorflow-build tensorflow 源码编译,提升硬件加速,支持cpu加速指令,suport SSE4 ...
- 在 CentOS 7.5 64位上使用 yum 安装 MySQL 8.0
前段时间在 CentOS 7.5 64位上安装 MySQL 8.0.查了些资料,在这里记录一下详细的安装和设置步骤. 一.安装 使用yum安装MySQL之前需要先下载对应的.rpm文件,下载方法: 去 ...
- [环境配置]Ubuntu 16.04 源码编译安装OpenCV-3.2.0+OpenCV_contrib-3.2.0及产生的问题
1.OpenCV-3.2.0+OpenCV_contrib-3.2.0编译安装过程 1)下载官方要求的依赖包 GCC 4.4.x or later CMake 2.6 or higher Git GT ...
- 源码编译安装gcc-5.3.0
系统环境:Amazon Linux AMI 2015.09.2 (HVM)---Fedora 23 Server 1.下载gcc-5.3.0安装包并将gcc-5.3.0.tar.gz放到/opt目录下 ...
- 64位Win7下编译hadoop 1.2.1问题解决
0.报sed的错误.原因在于没有安装cygwin.安装cygwin的时候要选择sed 1.Cannot run program "autoreconf". 这个问题在网上看了很多解 ...
随机推荐
- [置顶] android 自定义ListView实现动画特效
通过自定义ListView实现动画特效,被点击元素A向前移,A之前元素往后移动. 重点在于动画的实现: 具体代码如下: package com.open.widget; import java.uti ...
- OSX10.11 CocoaPods 升级总结
本文不会讨论CocoaPods的各种使用技巧以及各种原理,只是简单记录一下在升级过程中遇到的问题,如果使用中有各种问题来欢迎交流. Podfile.loc 文件变化 前几天一个小伙更新了CocoaPo ...
- 模板-->单变元模线性方程
如果有相应的OJ题目,欢迎同学们提供相应的链接 相关链接 所有模板的快速链接 extend_gcd模板 poj_2115_C Looooops,my_ac_code 简单的测试 None 代码模板 / ...
- python实现登录函数,比较简单
一个简单的python实现登录以及修改密码的函数 #密码错误3次,锁定登录: password_list = ['] def account_login(): Tries = 3 while Trie ...
- codevs 1993 草地排水 USACO
/*Dinic*/ #include<iostream> #include<cstdio> #include<cstring> #include<queue& ...
- solr可用于集群的搜索 【转】
一. SOLR搭建企业搜索平台 运行环境: 运行容器:Tomcat6.0.20 Solr版本:apache-solr-1.4.0 分词器:mmseg4j-1.6.2 词库:sogou-dic 准备工 ...
- NSURLConnection下载
@interface AppDelegate () <NSURLConnectionDataDelegate> { NSMutableData *mData;} @end @impl ...
- CSS 布局Float 【2】
1.页面标准文档流.浮动层.float属性 1.1 文档流 HTML页面的标准文档流(默认布局)是:从上到下,从左到右,遇块(块级元素)换行. 1.2 浮动层 浮动层:给元素的float属性赋值后,就 ...
- thinkphp中ajax用户名校验
ajax实在是太神奇了,刚刚接触,不足之处,请大家指正. 采用Ajax方式进行页面无刷新提示,来检测用户名是否存在. 搭建一个thinkphp的环境,在index.html中,ajax代码如下: &l ...
- C++11中int,float,double与string的转化
在C++11中可以使用std::to_string()函数将数值转换为string格式,十分方便. 以下部分来选自cplusplus.com. std::to_string string to_str ...