개발과삶2012.09.03 01:03

다운로드 : http://apache.tt.co.kr/hadoop/common/hadoop-1.0.3/


# apt-get -y install ssh rsync java7-jdk

# adduser hadoop

# su - hadoop


$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ chmod 644 ~/.ssh/authorized_keys


$ echo "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386;PATH=$PATH:$JAVA_HOME/bin" >> ~/.profile


$ wget http://apache.tt.co.kr/hadoop/common/hadoop-1.0.3/hadoop-1.0.3.tar.gz

$ tar xvfpz hadoop-1.0.3.tar.gz


$ cd hadoop-1.0.3


$ vi conf/hadoop-env.sh

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386


$ vi conf/core-site.xml

<configuration>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://localhost:9000</value>
    </property>
    <property>
        <name>hadoop.tmp.dir</name>
        <value>/home/hadoop/hadoop-1.0.3/hadoop-${user.name}</value>
    </property>
</configuration>


$ vi conf/hdfs-site.xml

<configuration>
    <property>
        <name>dfs.name.dir</name>
        <value>/home/hadoop/hadoop-1.0.3/dfs/name</value>
    </property>
    <property>
        <name>dfs.name.edits.dir</name>
        <value>${dfs.name.dir}</value>
    </property>
    <property>
        <name>dfs.data.dir</name>
        <value>/home/hadoop/hadoop-1.0.3/dfs/data</value>
    </property>
</configuration>


$ vi conf/mapred-site.xml

<configuration>
    <property>
        <name>mapred.job.tracker</name>
        <value>localhost:9001</value>
    </property>
    <property>
        <name>mapred.local.dir</name>
        <value>${hadoop.tmp.dir}/mapred/local</value>
    </property>
    <property>
        <name>mapred.system.dir</name>
        <value>${hadoop.tmp.dir}/mapred/system</value>
    </property>
</configuration>


$ hadoop namenode -format

$ start-all.sh


맵리듀스 확인
http://localhost:50030

HDFS 확인
http://localhost:50070


Posted by 종이비행기

티스토리 툴바