hadoop配置

所有的基本的配置,在下载下来的hadoop包中都有。hadoop-0.20.203.0\docs

 

1、下载hadoop,放到linux中

 

 

2、

 

修改以下配置文件。

 

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>

 

--------------------------------------------------------------------------

conf/hadoop-env.sh

 

# Set Hadoop-specific environment variables here.

 

# The only required environment variable is JAVA_HOME.  All others are

# optional.  When running a distributed configuration it is best to

# set JAVA_HOME in this file, so that it is correctly defined on

# remote nodes.

 

# The java implementation to use.  Required.

# export JAVA_HOME=/usr/lib/j2sdk1.5-sun

 

取消红色部分注释,然后修改我机器上的jdk目录

 

--------------------------------------------------------------------------

3、

配置 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

6.3. Execution

Format a new distributed-filesystem:

$ bin/hadoop namenode -format

Start the hadoop daemons:

$ bin/start-all.sh

 

 

4、如果启动后,发现日志中有异常。那么重新格式化namenode,然后启动。

 

 

5、在linux中安装eclipse 。版本最好是3.2的 我用的是

eclipse-java-europa-winter-linux-gtk-x86_64.tar.gz

 

6、解压后,复制hadoop-0.20.203.0\contrib\eclipse-plugin\hadoop-eclipse-plugin-0.20.203.0.jar。到eclipse的plugins目录下。启动eclipse

 

7、切换到 map/reduce编辑模式

 

明天抓图再写

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值