码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu 64位 配置hadoop 2.7

时间:2015-11-21 00:42:44      阅读:266      评论:0      收藏:0      [点我收藏+]

标签:

64位的Ubuntu上配置Hadoop需要先从源码编译,虽然Ubuntu是安装在虚拟机里的,完全可以再装一个32位,但现在麻烦一点积攒经验以后方便。然而写下这句话的时候编译的部分还没有完成。不管怎样,按照以往习惯,边做边写:

1. hadoop-2.7.1-src.tar.gz 解压缩。

2.其中的BUILDING.txt中对于工具的要求是:

Requirements:

* Unix System
* JDK 1.7+
* Maven 3.0 or later
* Findbugs 1.3.9 (if running findbugs)
* ProtocolBuffer 2.5.0
* CMake 2.6 or newer (if compiling native code), must be 3.0 or newer on Mac
* Zlib devel (if compiling native code)
* openssl devel ( if compiling native hadoop-pipes and to get the best HDFS encryption performance )
* Jansson C XML parsing library ( if compiling libwebhdfs )
* Linux FUSE (Filesystem in Userspace) version 2.6 or above ( if compiling fuse_dfs )
* Internet connection for first build (to fetch all Maven and Hadoop dependencies)

下面还有工具安装命令,安装完工具之后,就可以开始用maven对源码进行打包,对于maven的用法txt中也有说明:

An alternative is to run mvn install -DskipTests from Hadoop source top
level once; and then work from the submodule. 

这是在"Building components separately"中的说明。不知道我有没有领会到它正确的意思。然而按照网络上的各种教程,直接到根文件夹里,执行:

$mvn package -Pdist,native,docs -DskipTests -Dtar

就可以。这个在txt中的说明是:

Create binary distribution with native code and with documentation:

当然最好前面加上sudo避免权限的麻烦。

 

================

 

本来按照以上的步骤,就可以顺利完成,然而一切配置都不会一帆风顺,中间定会波澜诡谲。首先遇到的第一个问题是,maven自动下载dependency的地点连接速度太慢,有位博主总共花了快3个小时的时间才完成,因此为了快捷以及稳定,将maven的库地址改为开源中国所提供的(详细见网页中的修改方式)。

 

好的,修改了库地址到墙内之后,速度是快多了。然而又遇到问题,运行卡在了downloading某个文件那一步,不报错,长久地没有反应。据这里网友们的探讨,是因为JDK 1.7的问题(然而hadoop 2.7中指定要JDK 1.7+)。所以就面临两个选择:

1,将JDK换到1.6 。然而这会导致通不过运行:
技术分享

2,下载hadoop 2.6

(to be continued)

 

Ubuntu 64位 配置hadoop 2.7

标签:

原文地址:http://www.cnblogs.com/manqing/p/4982660.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!