·ÖÏí

´ÓÁã½ÌÄãÔÚLinux»·¾³Ï£¨ubuntu 12.04£©ÈçºÎ±àÒëhadoop2.4

ÎÊÌâµ¼¶Á£º

1.Èç¹û»ñÈ¡hadoop src  maven°ü£¿
2.±àÒëhadoopÐèҪװÄÄЩÈí¼þ£¿
3.ÈçºÎ±àÒëhadoop2.4?
À©Õ¹£º
±àÒëhadoopΪºÎ°²×°ÕâЩÈí¼þ£¿





Ò»¡¢Ê×ÏÈÏÂÔØhadoopÔ´Âë°ü
ÏÂÔصķ½Ê½»¹ÊDZȽ϶àµÄ
1.svnµÄ·½Ê½
svnÏÂÔØÊ×ÏÈÐèÒª°²×°SVN£¬Èç¹ûÏë³¢ÊÔʹÓÃsvn£¬¿ÉÒԲο¼Ô´Âë¹ÜÀí¡¢»ñÈ¡ÍøÂçÔ´Â빤¾ß£ºTortoiseSVNʹÓÃÊֲᣬhadoopµÄsvnÏÂÔصØÖ·µã´Ë
2.ѹËõ°üµÄ·½Ê½
ÕâÀïÎÒÃǽéÉÜÒ»ÖÖѹËõ°üµÄ·½Ê½¡£
Ê×ÏÈÎÒÃǵǼ¹ÙÍø£º
http://hadoop.apache.org/£¬ÎÒÃÇÕÒµ½ÏÂÃæÁ´½Ó£¬µã½øÈ¥ÏÂÔؼ´¿É¡£Èç¹û¸Õ½Ó´¥£¬²»ÖªµÀÔõôÏÂÔØ£¬¿ÉÒԲ鿴Ìû×ÓÐÂÊÖÖ¸µ¼£ºhadoop¹ÙÍø½éÉܼ°ÈçºÎÏÂÔØhadoop£¨2.4£©¸÷¸ö°æ±¾Óë²é¿´hadoop API½éÉÜ£¬ÀïÃæ½éÉܵĺÜÏêϸ¡£



¶þ¡¢½âѹ
  1. aboutyun@master:~$ tar zxvf hadoop-2.4.0-src.tar.gz
¸´ÖÆ´úÂë
½âѹÍê±Ï£¬ÎÒÃǻῴµ½ÏàÓ¦µÄÎļþ¼Ð£º
file.jpg


Èý¡¢½âѹÍê±Ï£¬ÎÒÃÇ¿ªÊ¼×¼±¸±àÒëËùÐèÒªµÄÈí¼þ
ÕâÀïÈí¼þµÄ×¼±¸£¬ºÜ¶àÎÄÕÂдµÄ¶¼²»È«£¬ÕâÀïÕûÀíһϡ£ÄÄЩÈí¼þÊÇÐèÒª°²×°µÄ¡£
ÕâÀïÐèҪ˵Ã÷µÄÊÇÓеÄLinuxÓÐ×Ô´øµÄÕâЩ¹¤¾ß£¬Õâ¸öÐèÒª×Ðϸ¿´Ò»Ï°汾ÊÇ·ñÆ¥Å䣬²»Æ¥ÅäÔòÉý¼¶Ò»Ï£¬ÓÐЩ²»ÄÜÉý¼¶£¬ÄÇô¾ÍÖØװһϰÉ

1¡¢jdkµÄ°²×°
²½ÖèÏÂÔØѹËõ°ü¡¢½âѹ¡¢ÅäÖû·¾³±äÁ¿

£¨1£©jdkÏÂÔØ
Á´½Ó: http://pan.baidu.com/s/1jGr41SU ÃÜÂë: rawv
£¨2£©jdk½âѹ
  1. tar zxvf jdk-7u51-linux-x64.tar.gz
¸´ÖÆ´úÂë
È»ºóÖØÃüÁîΪ£º
jdk.jpg

£¨3£©ÅäÖû·¾³±äÁ¿£º
ÈçÏÂͼËùʾºì×Ö²¿·ÖΪ£º(¼ÇµÃÕâÀïµÄ·¾¶¸Ä³É×Ô¼ºµÄʵ¼Ê°²×°Â·¾¶)
  1. /usr/jdk1.7/bin
¸´ÖÆ´úÂë


path.jpg



£¨4£©¼ìÑéÊÇ·ñ°²×°³É¹¦
javaversion.jpg


2¡¢mavenµÄ°²×°

  1. sudo apt-get install maven
¸´ÖÆ´úÂë
ÎÒÕâÀïÒѾ­°²×°
patgetmaven.jpg

ÉÏÃæ¿ÉÄÜ»¹ÐèÒªÅäÖû·¾³±äÁ¿Ö®ÀàµÄ£¬µ«ÊÇÎÒÕâÀïûÓкÃÏñÊÇϵͳ×Ô´øµÄ£¬ÍøÉϵÄ×ÊÁÏÒ²±È½Ï¶à£¬×¢ÒâmavenµÄ°æ±¾£¬ÎÒÕâÀïÊÇ3.0.4£¬hadoop2.4ÐèÒªmavenµÄÕâ¸ö°æ±¾»òÔò¸ü¸ßµÄ°æ±¾3.2.1°æ±¾Ò²ÊÇ¿ÉÒԵġ£
ÑéÖ¤°²×°ÊÇ·ñ³É¹¦
  1. mvn -version
¸´ÖÆ´úÂë


yanzhengmvn.jpg


3.protobufµÄ°²×°
Ϊ·ÀÖ¹³ö´í£¬ÕâÀï²¹³äһЩÄÚÈÝ£¬
3.1ÏÈ°²×°g++
  1. sudo apt-get install g++
¸´ÖÆ´úÂë



£¨1£©ÏÂÔØ

  1. sudo wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
¸´ÖÆ´úÂë
ÓÉÓÚgoogle²»ÄÜ·ÃÎÊ£¬¿ÉÒÔ´ÓÍøÅÌÏÂÔØÁ´½Ó£ºhttp://pan.baidu.com/s/1dDgWe6P ÃÜÂ룺xgiu

£¨2£©½âѹ
  1. tar zxvf protobuf-2.5.0.tar.gz
¸´ÖÆ´úÂë
ÈçÏÂЧ¹û£º
pro.jpg



È»ºó½øÈëprotobuf-2.5.0Îļþ¼Ð£¬½øÐÐÈçϲÙ×÷£º
pro1.jpg

  1. $ sudo ./configure
  2. $ sudo make
  3. $ sudo make check
  4. $ sudo make install
  5. $ sudo ldconfig
¸´ÖÆ´úÂë
Ð޸Ļ·¾³±äÁ¿£º
  1. sudo nano /etc/profile
¸´ÖÆ´úÂë


  1. export LD_LIBRARY_PATH=~/protobuf-2.5.0
¸´ÖÆ´úÂë
£¨LD_LIBRARY_PATHµÄÕâÀÌîдµÄÊÇprotobufÎļþµÄλÖã©

  1. source /etc/profile
¸´ÖÆ´úÂë
×¢Ò⣺ÅäÖÃ/etc/profile£¬ÔÚÐéÄâ»úÖØÆôºó£¬¿ÉÄÜÅäÖûáʧЧ£¬ËùÒÔÖØÆôºó£¬ÐèÒªÔÙ´ÎÖ´ÐÐsource²Ù×÷¡£


£¨3£©ÑéÖ¤

  1. protoc --version
¸´ÖÆ´úÂë


proversion.jpg


4.°²×°openssl¿â
  1. sudo apt-get install libssl-dev  
¸´ÖÆ´úÂë

5.CMake°²×°
  1. sudo yum install cmake
¸´ÖÆ´úÂë
»òÔò
  1. sudo apt-get install cmake
¸´ÖÆ´úÂë

6.ant°²×°

£¨1£©Ê×ÏÈÏÂÔØant
°Ù¶ÈÍøÅÌ£º apache-ant-1.9.4-bin.tar.gz
http://pan.baidu.com/s/1c0vjhBy

»òÔòÏÂÃæÁ´½Ó£º
apache-ant-1.9.4-bin.tar.gz

£¨2£©½âѹ
  1. tar zxvf  apache-ant-1.9.4-bin.tar.gz
¸´ÖÆ´úÂë

(3)ÅäÖû·¾³±äÁ¿


ÈçÏÂͼËùʾ£º
1.´ò¿ªprofile

  1. sudo vi /etc/profile
¸´ÖÆ´úÂë
2.Ìí¼ÓÏÂͼºì×Ö²¿·Ö£¬¼ÇµÃÐ޸ijÉ×Ô¼ºµÄ·¾¶



3.ÉúЧ
  1. source  /etc/profile
¸´ÖÆ´úÂë

4.¼ìÑé
  1. ant -version
¸´ÖÆ´úÂë



ËÄ¡¢±àÒëhadoop2.4
ÉÏÃæ×¼±¸¹¤×÷ÒѾ­×öµÄ²î²»¶àÁË£¬ÎÒÃÇÖÕÓÚ¿ÉÒÔ¿ªÊ¼£¬¼ÇµÃ½øÈësrcÎļþ¼ÐÏ£¬ÊäÈëÏÂÃæÃüÁî
  1. mvn package -Pdist,native -DskipTests -Dtar  
¸´ÖÆ´úÂë
bianyihadoop.jpg


µÈÁË40¶à·ÖÖÓ£¬ok
aboutyunbuild.png

ÔÚĿ¼~/hadoop-2.4.0-src/hadoop-dist/targetÏÂÓÐÎļþ£º
hadoop-2.4.0.tar.gz

target.jpg


¸ü¶àÄÚÈÝ£ºhadoop2.4»ã×Ü£ºhadoop2.4²å¼þÏÂÔØ¡¢ÍêÈ«·Ö²¼Ê½¡¢Î±·Ö²¼¡¢eclipse²å¼þ¿ª·¢´óÈ«


ÎÊÌâ×ܽ᣺
ÕâÀﻹÐèÒªÔÚ²¹³ä£º
1.Óöµ½´íÎó1£ºCMakeûÓа²×°
  1. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-
  2. plugin:1.6:run (make) on project hadoop-common: An Ant BuildException has
  3. occured: Execute failed: java.io.IOException: Cannot run program "cmake" (in
  4. directory "/home/wyf/hadoop-2.0.2-alpha-src/hadoop-common-project/hadoop-
  5. common/target/native"): java.io.IOException: error=2, No such file or directory
  6. -> [Help 1]
  7. [ERROR]
  8. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
  9. switch.
  10. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  11. [ERROR]
  12. [ERROR] For more information about the errors and possible solutions, please
  13. read the following articles:
  14. [ERROR] [Help 1]
  15. http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
¸´ÖÆ´úÂë

½â¾ö·½·¨£º
CMakeûÓа²×°
  1. sudo yum install cmake
¸´ÖÆ´úÂë
»òÔòʹÓÃ
  1. sudo apt-get install cmake
¸´ÖÆ´úÂë






2.Óöµ½´íÎó2£ºantûÓа²×°
  1. ERROR] Failed to execute goal org.codehaus.mojo.jspc:jspc-maven-plugin:2.0-
  2. alpha-3:compile (hdfs) on project hadoop-hdfs: Execution hdfs of goal
  3. org.codehaus.mojo.jspc:jspc-maven-plugin:2.0-alpha-3:compile failed: Plugin
  4. org.codehaus.mojo.jspc:jspc-maven-plugin:2.0-alpha-3 or one of its dependencies
  5. could not be resolved: Could not transfer artifact ant:ant:jar:1.6.5 from/to
  6. central (http://repo.maven.apache.org/maven2): GET request of:
  7. ant/ant/1.6.5/ant-1.6.5.jar from central failed: Read timed out -> [Help 1]
  8. [ERROR]
  9. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
  10. switch.
  11. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  12. [ERROR]
  13. [ERROR] For more information about the errors and possible solutions, please
  14. read the following articles:
  15. [ERROR] [Help 1]
  16. http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
  17. [ERROR]
  18. [ERROR] After correcting the problems, you can resume the build with the command
  19. [ERROR]   mvn <goals> -rf :hadoop-hdfs
¸´ÖÆ´úÂë

1.Ê×ÏÈÏÂÔØant
°Ù¶ÈÍøÅÌ£º apache-ant-1.9.4-bin.tar.gz
http://pan.baidu.com/s/1c0vjhBy

»òÔòÏÂÃæÁ´½Ó£º
apache-ant-1.9.4-bin.tar.gz

2.½âѹ
  1. tar zxvf  apache-ant-1.9.4-bin.tar.gz
¸´ÖÆ´úÂë
3.ÅäÖû·¾³±äÁ¿
¼ÇµÃÅäÖû·¾³±äÁ¿
ÈçÏÂͼËùʾ£º
1.´ò¿ªprofile
  1. sudo vi /etc/profile
¸´ÖÆ´úÂë
2.Ìí¼ÓÏÂͼºì×Ö²¿·Ö£¬¼ÇµÃÐ޸ijÉ×Ô¼ºµÄ·¾¶



3.ÉúЧ
  1. source  /etc/profile
¸´ÖÆ´úÂë

4.¼ìÑé
  1. ant -version
¸´ÖÆ´úÂë













3.protobuf°æ±¾¹ýµÍ£¬´íÎóÏÖÏó
  1. [ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.4.0:prot
  2. oc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecut
  3. ionException: 'protoc --version' did not return a version -> [Help 1]
  4. [ERROR]
  5. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
  6. ch.
  7. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  8. [ERROR]
  9. [ERROR] For more information about the errors and possible solutions, please rea
  10. d the following articles:
  11. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
  12. xception
  13. [ERROR]
  14. [ERROR] After correcting the problems, you can resume the build with the command
  15. [ERROR]   mvn <goals> -rf :hadoop-common
¸´ÖÆ´úÂë


common³ö´í£¬ÊÇÒòΪbufferµÄÔ­Òò.png


hadoop2.4¶ÔÓ¦µÄ°æ±¾ÊÇprotobuf-2.5.0


½â¾ö°ì·¨£º°´ÕÕ°²×°²½ÖèÖÐprotobufµÄ°²×°¼´¿É


4.ȨÏÞÎÊÌâ

20140622231803.jpg

½â¾ö°ì·¨£º
£¨1£©¼ÓÉÏsudo
£¨2£©Í¨¹ý
  1. ll
¸´ÖÆ´úÂë
°²×°°ü½âѹ֮ºó£¬ËùÊôÓû§¿ÉÄÜ·¢Éú±ä»¯£º

¸Ä±äÓû§

sudo chown -R aboutyun:aboutyun hadoop-2.4.0-src

ÉÏÃæaboutyun¸Ä³É×Ô¼ºµÄËùÊô×éºÍÓû§


ÃüÁî²é¿´ÊÇ·ñÊôÓÚµ±Ç°Óû§






ÒÑÓÐ(37)ÈËÆÀÂÛ

Ìøתµ½Ö¸¶¨Â¥²ã
desehawk ·¢±íÓÚ 2014-12-4 23:18:16
¼¸¶à³î ·¢±íÓÚ 2014-12-4 22:52
ϵͳ¾ÍÊÇ°´ÕÕÕâ¸öÌû×Ó×°µÄ°¡ £¬»á²»»áÊÇmavenÔ´µÄÎÊÌ⣬ÔõôÐ޸ģ¿
Ó¦¸Ã²»»á£¬²Î¿¼Õâ¸ö£¬¿ÉÄܶÔÄãÓÐËù°ïÖú
±àÒëhadoop2.5.2¾­Ñé×ܽᡢÎÊÌâ·ÖÎö¼°ÏÂÔØ32λ¡¢64λ°²×°°üÏÂÔØ
»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

é²ÝÎÝ-µ¥ÑÛƤ ·¢±íÓÚ 2014-9-11 13:33:08
ÎÒ×°HADOOP2.5£¬ÒÔÉϲ½Ö軹´æÔÚÒ»¸öÎÊÌâ:ÓÃ
sudo apt-get install maven
»ñµÃµÄ°æ±¾¸ú°æÖ÷µÄ²î²»¶à¡£ºÃÏóÊǵõ½µÄ3.0.5

ÓÃÕâ¸ö°æ±¾±àÒëhadoop src»á³ö´í:ÔÚÕâ²½
Apache Hadoop HDFS ............................
½â¾ö£º
ÏÂÔØ×îа汾MAVEN¾ÍûÎÊÌâÁË¡£maven¹ÙÍøÏÂ
Apache Maven 3.2.3

ÖÕÓÚ¿ÉÒÔ¿´µ½£º
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:22 h
[INFO] Finished at: 2014-09-10T20:32:03-07:00
[INFO] Final Memory: 79M/350M
[INFO] ------------------------------------------------------------------------


²»Ã÷°×ÎÒΪʲô»áÀ´µ½ÕâÀï¡£ÏëÏ붼¾õµÃÔκô
Ö»ÒòΪһ¸öÃû´Ê£ºNOSQL£¬°ÑÎÒ¸ãµÄ¡£
Ô­ÒÔΪNOSQLÖ»ÊǸö¿ªÔ´µÄÊý¾Ý¿â£¬²»ÓÃдSQLµÄÊý¾Ý¿â£¬Ã»Ïëµ½ÎÒͱÁ˸ö´óÂÆ×Ó¡£
Õ⼸ÌìµÄ¸Ð¾õ¾ÍÊǽøÈëÁË»ìãçµÄÊÀ½ç£¬Ò»Æ¬ÃÔâÖУ¬»¹ºÃÕâÀï¸ßÊÖ²»ÉÙ£¬ÎÄÕÂͦºÃ¡£ÎÒ¿ÉÒÔÒ»µãµãÀíÇéÍ·Ð÷¡£
»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

pig2 ·¢±íÓÚ 2014-8-16 15:02:56
±¾Ìû×îºóÓÉ pig2 ÓÚ 2014-8-16 15:04 ±à¼­
СÓã ·¢±íÓÚ 2014-8-16 14:56
°æ´ó£¬ÄãºÃ£¬ÎÒ°´ÕÕÄãµÄ½Ì³Ì³É¹¦±àÒëÁË64λµÄhadoop2.4.1¡£ÏÖÔÚÓÐÁ½¸öÎÊÌâÏëÇëÎÊÄãÏ¡£1.ÒòΪÎÒÏÖÔÚµÄϵͳ ...

HadoopÖ®ËùÒÔÒª±àÒ룬ÊÇÒòΪ¹ÙÍøûÓÐÌṩ64λ°²×°°ü£¬Ö»ÌṩÁË32λµÄ¡£hbaseÄãÖ±½ÓÏÂÔؼ´¿É£¬¿ÉÒÔ²»ÓñàÒë¡£
Ïêϸ²Î¿¼£º
hbase 0.96ÕûºÏµ½hadoop2.2Èý¸ö½ÚµãÈ«·Ö²¼Ê½°²×°¸ß¿É¿¿Îĵµ

¶ÔÓÚ·À»ðǽ£¬¿ÉÒÔ²»Óùرգ¬µ«ÊÇÐèÒª¿ª·ÅһЩ¶Ë¿Ú£¬ÕâÀïÐèÒª¶Ô·À»ðǽÓбȽϺõÄÀí½â£¬²ÅÄÜÕâô×ö¡£ËùÒÔΪÁ˱ÜÃâÂé·³£¬´ó¶àÊý£¬Ö±½Ó¹Ø±ÕÁË·À»ðǽ¡£

»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

ucloud ·¢±íÓÚ 2014-6-16 09:36:28
¸Õѧ£¬ÕýºÃÓõÃÉÏ¡£¹»ÏêϸµÄ¡£
»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

gaoyanzeng ·¢±íÓÚ 2014-6-16 18:46:13
¹»Ïêϸ£¬Ð»Ð»°¡¡£
»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

lycan ·¢±íÓÚ 2014-6-17 00:18:27
ͦÓÐÓõÄ,лл·ÖÏí
»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

΢ЦµÄÀÏÑÕ ·¢±íÓÚ 2014-6-19 21:21:04
·Ç³£ºÃµÄÌû×Ó Ç¿ÁÒÖ§³Ö ¶àл
»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

howtodown ·¢±íÓÚ 2014-7-8 14:00:19
´¿»·¾³£¬ÐèÒª°²×°ÏÂÃæÄÚÈÝ£º

sudo apt-get install maven
sudo apt-get install protobuf-compiler
sudo apt-get install cmake
sudo apt-get install zlib1g.dev
sudo apt-get install g++
sudo apt-get install libglib2.0-dev
sudo apt-get install libssl-dev

»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

СÓã ·¢±íÓÚ 2014-8-16 14:56:56
°æ´ó£¬ÄãºÃ£¬ÎÒ°´ÕÕÄãµÄ½Ì³Ì³É¹¦±àÒëÁË64λµÄhadoop2.4.1¡£ÏÖÔÚÓÐÁ½¸öÎÊÌâÏëÇëÎÊÄãÏ¡£1.ÒòΪÎÒÏÖÔÚµÄϵͳÊÇ64λµÄ¡£Èç¹ûÎÒÒª°²×°hbase»òÕßhiveµÈÆäËû×é¼þ£¬ÊDz»ÊÇÒ²ÊÇÒª±àÒë²ÅÄÜʹÓá£2.Ϊʲô¼¯ÈºÖ®Ç°Òª¹Ø±Õ·À»ðǽ¡£Èç¹ûÔÚÕýʽÏßÉÏ»·¾³ÏÂÒ²ÊÇÒª¹Ø±ÕµÄÂð£¿Ã²ËƹرշÀ»ðǽ»¹ÊÇÓе㲻Í׵İɣ¬ÔÚÏßÉϵĻ°¡£ÕâÁ½¸ö²ËÄñ¼¶ÎÊÌ⣬ÍûÄãÖ¸½Ì¡£¡£Ð»Ð»£¡
»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

é²ÝÎÝ-µ¥ÑÛƤ ·¢±íÓÚ 2014-9-10 21:41:54
×°Õâ¸ö protobuf ʱ
SUDO MAKE ³ö´í¡£
configure error: C++ preprocessor "/lib/cpp" fails sanity check  
ûעÒâ¿´howtodown»ØµÄÄÚÈÝ£¬×ÔÒÑÍøÉÏÕÒÁËÖ´ÐУº
sudo apt-get install build-essential
ÕâÑùÒ»ÏÂ,makeûÎÊÌâÁË
Ò²²»ÖªµÀÓÐûÓжà×°ÁËÆäËü¶«Î÷ÁË£¬»òÕ߶ÔÓ¦°æ±¾ÓÐûÎÊÌâÁË.
²»¹ÜÁË£¬ÏÈ¿ÉÒÔ½øÐÐÏÂÈ¥ÔÙ˵¡£
»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

1234ÏÂÒ»Ò³
ÄúÐèÒªµÇ¼ºó²Å¿ÉÒÔ»ØÌû µÇ¼ | Á¢¼´×¢²á

±¾°æ»ý·Ö¹æÔò

¹Ø±Õ

ÍƼöÉÏÒ»Ìõ /2 ÏÂÒ»Ìõ