Hadoop上路_03-伪分布式集群配置

1.配置%hadoop%/conf/hadoop-env.sh中的JDK

修改 JAVA_HOME sudo gedit hadoop-evn.sh  
# The java implementation to use.  Required.

export JAVA_HOME=/usr/jdk1.6.0_24

Hadoop上路_03-伪分布式集群配置 

2.配置%hadoop%/conf/core-site.xml中的HDFS

sudo gedit core-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->
<configuration>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://localhost:9000</value>
    </property>
    <property>
       <name>hadoop.tmp.dir</name>
        <!-- 当前用户须要对此目录有读写权限 -->  
        <value>/home/hm/hadoop-${user.name}</value> 
    </property> 
</configuration>

 Hadoop上路_03-伪分布式集群配置

3.配置%hadoop%/conf/hdfs-site.xml中的HDFS

sudo gedit hdfs-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<!-- 注意标签正确配对 -->
<name>dfs.replication<name>
<value>1</value>    
</property>      
</configuration>

Hadoop上路_03-伪分布式集群配置 

4.配置%hadoop%/conf/mapred-site.xml中的JobTracker

sudo gedit mapred-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:9001</value>
</property>
   <property>
   <name>mapred.child.tmp</name>
   <value>/opt/temp</value> 
   </property>   
</configuration>

 Hadoop上路_03-伪分布式集群配置

-end

你可能感兴趣的:(hadoop,数据库,分布式,云计算,1.1.2)