下載CDH版本
wget http://archive.cloudera.com/cdh/3/hadoop-0.20.2-CDH3B4.tar.gz
wget http://archive.cloudera.com/cdh/3/sqoop-1.2.0-CDH3B4.tar.gz
解壓
tar -xzvf hadoop-0.20.2-CDH3B4.tar.gz
tar -xzvf sqoop-1.2.0-CDH3B4.tar.gz
備份原檔
cp -r hadoop-0.20.2-CDH3B4 hadoop
cp -r sqoop-1.2.0-CDH3B4 sqoop
設置PATH((指令))
echo "export HADOOP_HOME=/home/hadoop/hadoop" >> /etc/profile
echo "export PATH=\$PATH:$HADOOP_HOME/bin" >> /etc/profile
重啟(reboot)
設置JAVA_HOME環境於 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.6-sun
export JAVA_HOME=/usr/java/jre1.6.0_29
-----------------以下省略
設定NameNode位置 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://hds01:9000/</value>
</property>
</configuration>
設定 hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
</configuration>
設定 mapred-site.xml
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>hds01:9001</value>
</property>
</configuration>
參考文件:http://hadoop.apache.org/common/docs/current/cluster_setup.html
設定 masters
hds01
設定 masters
hds01設定 slaves
hds01
hds02
hds03
沒有留言:
張貼留言