免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3139 | 回复: 0
打印 上一主题 下一主题

[Hadoop&HBase] ubuntu9.10上安装hadoop [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-01-21 20:55 |只看该作者 |倒序浏览

                                                                安装环境:
1.ubuntu9.10
2.hadoop-0.20.1,Pseudo-Distributed Operation,目前是在自己的Notebook上安装,所以先选择这个模式,下学期在实验室环境下安装Fully-Distributed Operation
安装JAVA环境:
1.安装Java环境:
Open a shell prompt (terminal) and type the following to install JDK and JRE:
               
               
                $ sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
2.更新
updates  all  alternatives belonging to one runtime or development kit for the Java language
$ sudo update-java-alternatives -s java-6-sun
3.默认的Java安装路径是/usr/lib/jvm
4.设置环境变量JAVA_HOME和PATH
$ vi $HOME/.bash_rc
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:$JAVA_HOME/bin
5.OK,写个Java代码测试一下环境是否Available...
下面开始安装hadoop
1.下载hadoop-0.20.1,解压到~/hadoop目录下(这个当然是按自己需求指定的)。cd到源码主目录下。
2.修改conf/hadoop-env.sh to define at least
        JAVA_HOME to be the root of your Java installation。
也就是把带有JAVA_HOME的一行改为:
export JAVA_HOME=/usr/lib/jvm/java-6-sun
3.修改下面三个配置文件
conf/core-site.xml:
configuration>
  property>
    name>fs.default.name/name>
    value>hdfs://localhost:9000/value>
  /property>
/configuration>
conf/hdfs-site.xml:
configuration>
  property>
    name>dfs.replication/name>
    value>1/value>
  /property>
/configuration>
conf/mapred-site.xml:
configuration>
  property>
    name>mapred.job.tracker/name>
    value>localhost:9001/value>
  /property>
/configuration>
Setup passphraseless ssh
          Now check that you can ssh to the localhost without a passphrase:
$ ssh localhost
         
        
          If you cannot ssh to localhost without a passphrase, execute the
          following commands:
$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
                     
                  
               
Execution
          Format a new distributed-filesystem:
$ bin/hadoop namenode -format
         
        
                  Start the hadoop daemons:
$ bin/start-all.sh
Browse the web interface for the NameNode and the JobTracker; by
        default they are available at:
NameNode   -
            
http://localhost:50070/
JobTracker -
            
http://localhost:50030/
我的firefox开了学校的代理,导致最开始不能访问上面的地址,折腾了一下才找出这个原因。
接下来的任务:在该环境下试运行mapreduce的程序
参考地址:http://hadoop.apache.org/common/docs/r0.20.1/quickstart.html
http://www.cyberciti.biz/faq/howto-ubuntu-linux-install-configure-jdk-jre/
         
        
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/99156/showart_2156593.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP