hadoop安装步骤

1将压缩包复制到crywin/home/hhp下

2解压 tar -xzf hadoop-0.20.2.tar.gz
3配置文件:包括 hadoop-env.sh  , core-site.xml, hdfs-site.xml, mapred-site.xml , masters , slaves一共 6 个文件。
hadoop-env.sh
export JAVA_HOME=/cygdrive/d/jdk1.6.0_10
export HADOOP_CLASSPATH=/home/hhp/hadoop-0.20.2

参考命令:
路径转换:
How do I convert between Windows and UNIX paths?
 
     Use the 'cygpath' utility. Type 'cygpath --help' for information. For example (on my installation):

    bash$ cygpath --windows ~/.bashrc
        D:\starksb\.bashrc
        bash$ cygpath --unix C:/cygwin/bin/cygwin.bat
        /usr/bin/cygwin.bat
        bash$ cygpath --unix C:\\cygwin\\bin\\cygwin.bat
        /usr/bin/cygwin.bat
Note that bash interprets the backslash '\' as an escape character, so you must type it twice in the bash shell if you want it to be recognized as such.
文件名包含空格:
空格被作为单词分隔符;
    bash-2.03$ cd '/cygdrive/c/Program Files'
    or
    bash-2.03$ cd /cygdrive/c/Program\ Files

core-site.xml:

 <property>

  <name>fs.default.name</name>

  <value>hdfs://202.112.1.50:9000</value>
 </property>

hdfs-site.xml
<property>

  <name>dfs.replication</name>

  <value>1</value>
</property>

mapred-site.xml :
<property>

  <name>mapred.job.tracker</name>

  <value> 202.112.1.50 :9001</value>

</property>
4免密码ssh设置
ssh localhost yes 输入密码

4格式化namenode
bin/hadoop namenode -format

5启动hadoop守护进程
bin/start-all.sh
NameNode - http://localhost:50070/
JobTracker - http://localhost:50030/

6配置eclipse:
将插件hadoop-eclipse-plugin-0.20.3-SNAPSHOT 放入eclipse
启动eclipse
配置9001 9000


停止hadoop:
bin/stop-all.sh











评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值