7、修改$HADOOP_HOME/conf/hadoop-env.sh文件的环境变量:
# The java implementation to use. Required.
export JAVA_HOME=/usr/java/jdk1.6.0_27
8、修改$HADOOP_HOME/conf/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>hadoop.tmp.dir</name>
<value>/hadoopdata</value>
<description>A base for other temporary directories.</description>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://192.168.1.211:9000</value>
<description>The name of the default file system. A URI whose
scheme and authority determine the FileSystem implementation. The
uri's scheme determines the config property (fs.SCHEME.impl) naming
the FileSystem implementation class. The uri's authority is used to
determine the host, port, etc. for a filesystem.</description>
</property>
<property>
<name>dfs.hosts.exclude</name>
<value>excludes</value>
</property>
</configuration>
9、修改$HADOOP_HOME/conf/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>
10、修改$HADOOP_HOME/conf/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>192.168.1.211:9001</value>
<description>The host and port that the MapReduce job tracker runs
at. If "local", then jobs are run in-process as a single map
and reduce task.
</description>
</property>
</configuration>
11、修改/ect/profile配置文件,在末尾追加以下内容,并输入source/etc/profile使之生效:
export JAVA_HOME=/usr/java/jdk1.6.0_27
export JRE_HOME=/usr/java/jdk1.6.0_27/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH
export HADOOP_HOME=/home/hadoop/hadoop-1.0.1
export PATH=$HADOOP_HOME/bin:$PATH
export PATH=$PATH:$HIVE_HOME/bin
12、将主控机器上Hadoop分别给节点机器复制一份。
将/ect/profile拷贝到132、133和134机器上。注意profile需要做生效操作。